Files
seaweedfs/weed/s3api
Chris LuandGitHub ba90ae5c94 fix(s3): don't count ErrNotFound as filer health failure in failover (#8995)
* fix(s3): don't count ErrNotFound as filer health failure in failover

The S3 gateway's filer client failover was recording ErrNotFound
(entry doesn't exist) as a filer health failure. In multi-filer
setups where filers have separate metadata stores, normal object
lookups that return "not found" accumulated in the circuit breaker,
eventually marking healthy filers as unhealthy after just 3 lookups.

This caused the distributed lock integration test to fail with 500
InternalError: once a filer was circuit-broken, subsequent lookups
could no longer fall back, turning a would-be 412 PreconditionFailed
into an unrecoverable internal error.

Only record actual transport/server failures in the health tracker.
The failover still tries other filers for data locality, but no
longer penalizes filers for correctly reporting missing entries.

* style: inline isNotFound variable for consistency

The variable was only used once; inlining it matches the pattern
already used in the failover loop a few lines below.
2026-04-08 17:08:57 -07:00
..
2026-01-28 14:34:07 -08:00
2024-07-04 11:00:41 -07:00
2026-02-20 18:40:47 -08:00
2024-07-04 11:00:41 -07:00
2025-08-22 01:15:42 -07:00
2025-10-27 23:04:55 -07:00
2025-07-28 02:49:43 -07:00

see https://blog.aqwari.net/xml-schema-go/

1. go get aqwari.net/xml/cmd/xsdgen
2. Add EncodingType element for ListBucketResult in AmazonS3.xsd
3. xsdgen -o s3api_xsd_generated.go -pkg s3api AmazonS3.xsd
4. Remove empty Grantee struct in s3api_xsd_generated.go
5. Remove xmlns: sed s'/http:\/\/s3.amazonaws.com\/doc\/2006-03-01\/\ //' s3api_xsd_generated.go