Browse Source

fix existence checking

pull/1811/head
Chris Lu 4 years ago
parent
commit
3097b9a9b7
  1. 2
      weed/topology/data_node_ec.go

2
weed/topology/data_node_ec.go

@ -62,7 +62,7 @@ func (dn *DataNode) UpdateEcShards(actualShards []*erasure_coding.EcVolumeInfo)
deltaDiskUsages := newDiskUsages() deltaDiskUsages := newDiskUsages()
deltaDiskUsage := deltaDiskUsages.getOrCreateDisk(types.ToDiskType(ecShards.DiskType)) deltaDiskUsage := deltaDiskUsages.getOrCreateDisk(types.ToDiskType(ecShards.DiskType))
if dn.hasEcShards(ecShards.VolumeId) {
if !dn.hasEcShards(ecShards.VolumeId) {
newShards = append(newShards, ecShards) newShards = append(newShards, ecShards)
newShardCount += ecShards.ShardIdCount() newShardCount += ecShards.ShardIdCount()
} }

Loading…
Cancel
Save