fix cluster: hashRing stale after rebalance, GetShardMap empty, loops, and migration no-op
- GetShardMap: copy Shards and Nodes map contents before returning - hashRing: rebuild from shardMap.Nodes after every rebalance/shard_map update - DistributedVM.handleRebalanceRequest: add leader check and self-broadcast guard - route_message: add hop-count (MaxRouteHops=10) to prevent infinite loops - handleMigrationRequest: broadcast migration updates instead of setting local copy
This commit is contained in:
@@ -191,11 +191,15 @@ func (m *ModelPayload) GetID() string { return m.ID }
|
||||
// GetName implements RuntimeModel
|
||||
func (m *ModelPayload) GetName() string { return m.Name }
|
||||
|
||||
// MaxRouteHops is the maximum number of hops a routed message can take before being dropped
|
||||
const MaxRouteHops = 10
|
||||
|
||||
// MessagePayload is a concrete type for JSON-unmarshaling RuntimeMessage payloads.
|
||||
// Use this when receiving message data over the network.
|
||||
type MessagePayload struct {
|
||||
TargetActorID string `json:"targetActorId"`
|
||||
Type string `json:"type"`
|
||||
Hops int `json:"hops,omitempty"`
|
||||
}
|
||||
|
||||
// GetTargetActorID implements RuntimeMessage
|
||||
|
||||
Reference in New Issue
Block a user