mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 18:37:24 +08:00
Avoid wrong way to delete on replication failure
Avoid wrong way to delete on replication failure. This deletion has bug to write. The better fix is not to use the deletion on failure at all.
This commit is contained in:
@@ -45,16 +45,6 @@ func ReplicatedWrite(masterNode string, s *storage.Store,
|
||||
}
|
||||
}
|
||||
}
|
||||
if errorStatus != "" {
|
||||
if _, err = s.Delete(volumeId, needle); err != nil {
|
||||
errorStatus += "\nCannot delete " + strconv.FormatUint(needle.Id, 10) + " from " +
|
||||
volumeId.String() + ": " + err.Error()
|
||||
} else {
|
||||
distributedOperation(masterNode, s, volumeId, func(location operation.Location) bool {
|
||||
return nil == util.Delete("http://"+location.Url+r.URL.Path+"?type=replicate", jwt)
|
||||
})
|
||||
}
|
||||
}
|
||||
size = ret
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user