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:
Chris Lu committed 2026-09-23 17:07:02 -07:00
1 parent 8cc3e299fc
commit b6dd48403e
2 files changed
+3 -5

No files matched your search

+2 -4
View File
@@ -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 {