* util/http, operation, topology: give the DELETE helpers a deadline
Delete and DeleteProxied made their request without a context and read
the whole answer. Only the shared client's 30 s response header timeout
bounded them, and nothing bounded an answer whose body never ends.
- The cleanup after a failed chunk upload (deleteChunkFromHolders, used
by PutObject and every chunked upload) asks the holder that just
failed the write, often the one that stalls. A holder that did not
answer held the upload for 30 s per holder and attempt, with the
chunk's buffer. One that sent its headers and stalled held it for
good, and the holders after it were never asked. Each delete is now
bounded by cleanupDeleteTimeout (10 s), as the copy path's cleanup is
by copyCleanupTimeout (#13297). A delete that runs out is logged and
leaves the needle, as a failed delete did before.
- A delete forwarded to a replica that does not answer held the
primary's DELETE for 30 s, while a forwarded write fails at
replicaRequestTimeout. The delete forward now has the same bound, as
the Rust volume server's replica_request already gives deletes. Its
timeout is counted as a timeout, through replicaDeadlineError, which
the write forward uses as well.
Delete and DeleteProxied take a context. benchmark and the unmaintained
repeated_vacuum pass context.Background().
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* topology: let a replica's failure leave the other replica deletes running
DistributedOperation cancels its context when the first replica fails, and
the delete deadline was derived from it, so a sibling's failure could cut
the deletes to the other replicas short. The old context-free Delete kept
them going, and they must: the needle is gone on this server already, so
a replica that is not asked keeps its copy. Each delete now takes its
deadline from context.Background().
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* topology: read the replica delete bound once, before the fan-out
A replica delete that outlives ReplicatedDelete read the package bound
again after its answer, racing a later caller that changes it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
* Added global http client
* Added Do func for global http client
* Changed the code to use the global http client
* Fix http client in volume uploader
* Fixed pkg name
* Fixed http util funcs
* Fixed http client for bench_filer_upload
* Fixed http client for stress_filer_upload
* Fixed http client for filer_server_handlers_proxy
* Fixed http client for command_fs_merge_volumes
* Fixed http client for command_fs_merge_volumes and command_volume_fsck
* Fixed http client for s3api_server
* Added init global client for main funcs
* Rename global_client to client
* Changed:
- fixed NewHttpClient;
- added CheckIsHttpsClientEnabled func
- updated security.toml in scaffold
* Reduce the visibility of some functions in the util/http/client pkg
* Added the loadSecurityConfig function
* Use util.LoadSecurityConfiguration() in NewHttpClient func
* Added context for the MasterClient's methods to avoid endless loops
* Returned WithClient function. Added WithClientCustomGetMaster function
* Hid unused ctx arguments
* Using a common context for the KeepConnectedToMaster and WaitUntilConnected functions
* Changed the context termination check in the tryConnectToMaster function
* Added a child context to the tryConnectToMaster function
* Added a common context for KeepConnectedToMaster and WaitUntilConnected functions in benchmark