diff options
| author | chrislu <chris.lu@gmail.com> | 2022-04-05 19:03:02 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-04-05 19:03:02 -0700 |
| commit | bc888226fc89f623391b78d4f642c63b7e100967 (patch) | |
| tree | fe4d1b360a10d1f8cf2b6a2d6f842bcfa1bee6b2 /weed/server/master_grpc_server.go | |
| parent | 8b3d76b24dc52a0d125c372b439d711a065b2d40 (diff) | |
| download | seaweedfs-bc888226fc89f623391b78d4f642c63b7e100967.tar.xz seaweedfs-bc888226fc89f623391b78d4f642c63b7e100967.zip | |
erasure coding: tracking encoded/decoded volumes
If an EC shard is created but not spread to other servers, the masterclient would think this shard is not located here.
Diffstat (limited to 'weed/server/master_grpc_server.go')
| -rw-r--r-- | weed/server/master_grpc_server.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/weed/server/master_grpc_server.go b/weed/server/master_grpc_server.go index 50fcc0d62..1ad8edf91 100644 --- a/weed/server/master_grpc_server.go +++ b/weed/server/master_grpc_server.go @@ -133,13 +133,13 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ ms.Topo.IncrementalSyncDataNodeEcShards(heartbeat.NewEcShards, heartbeat.DeletedEcShards, dn) for _, s := range heartbeat.NewEcShards { - message.NewVids = append(message.NewVids, s.Id) + message.NewEcVids = append(message.NewEcVids, s.Id) } for _, s := range heartbeat.DeletedEcShards { - if dn.HasVolumesById(needle.VolumeId(s.Id)) { + if dn.HasEcShards(needle.VolumeId(s.Id)) { continue } - message.DeletedVids = append(message.DeletedVids, s.Id) + message.DeletedEcVids = append(message.DeletedEcVids, s.Id) } } @@ -151,17 +151,17 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ // broadcast the ec vid changes to master clients for _, s := range newShards { - message.NewVids = append(message.NewVids, uint32(s.VolumeId)) + message.NewEcVids = append(message.NewEcVids, uint32(s.VolumeId)) } for _, s := range deletedShards { if dn.HasVolumesById(s.VolumeId) { continue } - message.DeletedVids = append(message.DeletedVids, uint32(s.VolumeId)) + message.DeletedEcVids = append(message.DeletedEcVids, uint32(s.VolumeId)) } } - if len(message.NewVids) > 0 || len(message.DeletedVids) > 0 { + if len(message.NewVids) > 0 || len(message.DeletedVids) > 0 || len(message.NewEcVids) > 0 || len(message.DeletedEcVids) > 0 { ms.broadcastToClients(&master_pb.KeepConnectedResponse{VolumeLocation: message}) } |
