mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix existence checking
This commit is contained in:
parent
ebf320ec22
commit
3097b9a9b7
|
@ -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…
Reference in a new issue