SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
wdclient: count an elapsed caller deadline as caller-gave-up in LookupVolumeIds (#12151)
Chris Lua2863bf83be6
diff --git a/weed/wdclient/filer_client.go b/weed/wdclient/filer_client.goindex b09bc303fc..98f1150144 100644--- a/weed/wdclient/filer_client.go+++ b/weed/wdclient/filer_client.go@@ -788,8 +788,16 @@ func (p *filerVolumeProvider) LookupVolumeIds(ctx context.Context, volumeIds []s}()if err != nil {- // a caller that gave up says nothing about this filer- if ctxErr := ctx.Err(); ctxErr != nil {+ // a caller that gave up says nothing about this filer; gRPC can+ // surface its own DeadlineExceeded a tick before ctx.Err()+ // becomes visible, so reinterpret only deadline errors this way+ ctxErr := ctx.Err()+ if ctxErr == nil && status.Code(err) == codes.DeadlineExceeded {+ if dl, ok := ctx.Deadline(); ok && !dl.After(time.Now()) {+ ctxErr = context.DeadlineExceeded+ }+ }+ if ctxErr != nil {if lastErr != nil {return nil, fmt.Errorf("%w (earlier filer error: %v)", ctxErr, lastErr)}