mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-18 03:58:32 +02:00
filer.remote.sync: classify refused stamps by gRPC status only
A FailedPrecondition substring in an unrelated error would have been swallowed as a skipped stamp; status.FromError already unwraps.
This commit is contained in:
1 parent
8cc3e299fc
commit
b6dd48403e
2 files changed
+3
-5
No files matched your search
@@ -460,10 +460,8 @@ func isFailedPrecondition(err error) bool {
|
||||
if err == nil {
|
||||
return false
|
||||
}
|
||||
if st, ok := status.FromError(err); ok && st.Code() == codes.FailedPrecondition {
|
||||
return true
|
||||
}
|
||||
return strings.Contains(err.Error(), "precondition failed")
|
||||
st, ok := status.FromError(err)
|
||||
return ok && st.Code() == codes.FailedPrecondition
|
||||
}
|
||||
|
||||
func isMultipartUploadFile(dir string, name string) bool {
|
||||
|
||||
Reference in new issue
Block a user