mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-12-21 11:00:08 +08:00
erasure coding: tracking encoded/decoded volumes
If an EC shard is created but not spread to other servers, the masterclient would think this shard is not located here.
This commit is contained in:
@@ -58,7 +58,7 @@ func (dn *DataNode) UpdateEcShards(actualShards []*erasure_coding.EcVolumeInfo)
|
||||
}
|
||||
|
||||
for _, ecShards := range actualShards {
|
||||
if dn.hasEcShards(ecShards.VolumeId) {
|
||||
if dn.HasEcShards(ecShards.VolumeId) {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ func (dn *DataNode) UpdateEcShards(actualShards []*erasure_coding.EcVolumeInfo)
|
||||
return
|
||||
}
|
||||
|
||||
func (dn *DataNode) hasEcShards(volumeId needle.VolumeId) (found bool) {
|
||||
func (dn *DataNode) HasEcShards(volumeId needle.VolumeId) (found bool) {
|
||||
dn.RLock()
|
||||
defer dn.RUnlock()
|
||||
for _, c := range dn.children {
|
||||
|
||||
Reference in New Issue
Block a user