Browse Source

simplify

pull/7501/head
chrislu 3 weeks ago
parent
commit
a8c45e02dd
  1. 3
      weed/storage/store.go

3
weed/storage/store.go

@ -295,9 +295,8 @@ func (s *Store) CollectHeartbeat() *master_pb.Heartbeat {
effectiveMaxCount := location.MaxVolumeCount
if location.isDiskSpaceLow {
usedSlots := int32(location.LocalVolumesLen())
if ecShardCount := location.EcShardCount(); ecShardCount > 0 {
ecShardCount := location.EcShardCount()
usedSlots += int32((ecShardCount + erasure_coding.DataShardsCount - 1) / erasure_coding.DataShardsCount)
}
effectiveMaxCount = usedSlots
}
if effectiveMaxCount < 0 {

Loading…
Cancel
Save