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/wdclient/masterclient.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/wdclient/masterclient.go')
| -rw-r--r-- | weed/wdclient/masterclient.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.go index 53236fc6d..b1b9d474e 100644 --- a/weed/wdclient/masterclient.go +++ b/weed/wdclient/masterclient.go @@ -159,6 +159,14 @@ func (mc *MasterClient) tryConnectToMaster(master pb.ServerAddress) (nextHintedL glog.V(1).Infof("%s: %s masterClient removes volume %d", mc.clientType, loc.Url, deletedVid) mc.deleteLocation(deletedVid, loc) } + for _, newEcVid := range resp.VolumeLocation.NewEcVids { + glog.V(1).Infof("%s: %s masterClient adds ec volume %d", mc.clientType, loc.Url, newEcVid) + mc.addEcLocation(newEcVid, loc) + } + for _, deletedEcVid := range resp.VolumeLocation.DeletedEcVids { + glog.V(1).Infof("%s: %s masterClient removes ec volume %d", mc.clientType, loc.Url, deletedEcVid) + mc.deleteEcLocation(deletedEcVid, loc) + } } if resp.ClusterNodeUpdate != nil { |
