[v25.3.x] cloud_io/cache: fix shard 0 misuse in put ENOSPC handler#30352
Merged
nvartolomei merged 2 commits intoMay 2, 2026
Merged
Conversation
trim() asserts shard 0 only, so the local trim_throttled() call from put's ENOSPC handler aborted when put ran on a non-zero shard. And set_block_puts only flipped the calling shard's flag, leaving other shards racing into a full disk. Route trim_throttled to shard 0 via invoke_on(0, ...) and broadcast the block-puts flag with invoke_on_all, mirroring notify_disk_status. (cherry picked from commit 47364d0)
Add vasserts to trim_throttled, trim_throttled_unlocked, maybe_background_trim, and sync_access_time_tracker so that any future caller from a non-zero shard fails loudly rather than silently operating on shard-local state that's only meaningful on shard 0. Also break() the cleanup, access-tracker-writer, and tracker-sync semaphores on non-zero shards from the constructor: those semaphores exist solely to serialise shard 0 work, and any get_units call on another shard is a bug. (cherry picked from commit 96d229f)
Collaborator
Author
CI test resultstest results on build#83878
|
nvartolomei
approved these changes
May 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of PR #30335
Conflict details
trim_throttled_unlockedsignature on v25.3.x lacks thestd::optional<ss::lowres_clock::time_point> deadlineparameter that exists on dev. Kept the v25.3.x signature unchanged and applied the incomingvassert(ss::this_shard_id() == 0, "Method can only be invoked on shard 0")at the top of the function.