mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Merge branch 'master' of https://github.com/seaweedfs/seaweedfs
This commit is contained in:
commit
27c7611ebf
|
@ -68,11 +68,6 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
|
||||||
glog.V(0).Infof("disconnect phantom volume server %s:%d remaining %d", dn.Ip, dn.Port, dn.Counter)
|
glog.V(0).Infof("disconnect phantom volume server %s:%d remaining %d", dn.Ip, dn.Port, dn.Counter)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// if the volume server disconnects and reconnects quickly
|
|
||||||
// the unregister and register can race with each other
|
|
||||||
ms.Topo.UnRegisterDataNode(dn)
|
|
||||||
glog.V(0).Infof("unregister disconnected volume server %s:%d", dn.Ip, dn.Port)
|
|
||||||
ms.UnRegisterUuids(dn.Ip, dn.Port)
|
|
||||||
|
|
||||||
message := &master_pb.VolumeLocation{
|
message := &master_pb.VolumeLocation{
|
||||||
Url: dn.Url(),
|
Url: dn.Url(),
|
||||||
|
@ -85,6 +80,12 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
|
||||||
message.DeletedVids = append(message.DeletedVids, uint32(s.VolumeId))
|
message.DeletedVids = append(message.DeletedVids, uint32(s.VolumeId))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if the volume server disconnects and reconnects quickly
|
||||||
|
// the unregister and register can race with each other
|
||||||
|
ms.Topo.UnRegisterDataNode(dn)
|
||||||
|
glog.V(0).Infof("unregister disconnected volume server %s:%d", dn.Ip, dn.Port)
|
||||||
|
ms.UnRegisterUuids(dn.Ip, dn.Port)
|
||||||
|
|
||||||
if len(message.DeletedVids) > 0 {
|
if len(message.DeletedVids) > 0 {
|
||||||
ms.broadcastToClients(&master_pb.KeepConnectedResponse{VolumeLocation: message})
|
ms.broadcastToClients(&master_pb.KeepConnectedResponse{VolumeLocation: message})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue