When the volume server is stopped, the master server immediately sees the deletion of volumes

This commit is contained in:
Konstantin Lebedev
2020-10-31 02:48:25 +05:00
parent eb32af25d4
commit 46303c36bf
2 changed files with 23 additions and 1 deletions

View File

@@ -194,6 +194,12 @@ func (s *Store) SetDataCenter(dataCenter string) {
func (s *Store) SetRack(rack string) {
s.rack = rack
}
func (s *Store) GetDataCenter() string {
return s.dataCenter
}
func (s *Store) GetRack() string {
return s.rack
}
func (s *Store) CollectHeartbeat() *master_pb.Heartbeat {
var volumeMessages []*master_pb.VolumeInformationMessage
@@ -229,7 +235,6 @@ func (s *Store) CollectHeartbeat() *master_pb.Heartbeat {
}
}
if v.IsReadOnly() {
collectionVolumeReadOnlyCount[v.Collection] = make(map[string]uint8)
collectionVolumeReadOnlyCount[v.Collection]["IsReadOnly"] += 1
if v.noWriteOrDelete {
collectionVolumeReadOnlyCount[v.Collection]["noWriteOrDelete"] += 1