Repository navigation
S3Queue: allow altering tracked_files_limit in ordered mode and fix exclusive-mode failure terminality - #125604
Conversation
Adds the failed_files_ttl_sec engine setting, which controls time-based expiry of terminal failed files in unordered mode. tracked_files_limit's description is also updated to document that it caps the failed-files set by count in both ordered and unordered mode, independently of the new setting. For tables created before this setting existed, the value is inherited from tracked_file_ttl_sec at attach time; this inheritance is a one-time fallback and is not kept in sync with later changes to tracked_file_ttl_sec.
…che reconciliation
…arker in waitForPathToBeProcessed
…ck in hash-ring path; fix retriable marker test helper
…r a cache-hot Failed file
tracked_files_limit also caps the /failed set in ordered mode, but was missing from changeable_settings_ordered_mode, so ALTER ... MODIFY SETTING was rejected. Add it to the list and cover with an integration test.
…ries are exhausted getPathState() hard-coded is_terminal_out = true for every Failed state, while the claim path (setProcessingImpl, prepareFailedRequestsImpl) treats a failure as retryable until retries reach max_loading_retries. As a result waitForPathToBeProcessed() could throw ABORTED on the first retryable exclusive failure. Mirror the claim check instead.
|
I folded the exclusive-mode getPathState() fix (deferred from #121752) into this PR, since both changes are small mode-specific fixes. Happy to split it into a separate PR if you prefer. Also, could the Phase 2 PRs (#125392, #125433, #125565, #125604) get the |
|
Workflow [PR], commit [cf056da] Summary: ❌
AI ReviewSummaryReviewed Missing context / blind spots
Findings❌ Blockers
Tests
Final Verdict❌ Block. Preserve existing ordered-table TTL behavior and cover it with the focused regression. The deferred correctness issues also remain in the full current diff; reconcile the dependency and sibling fixes before merging that combined implementation. Existing dismissed threads were left unchanged, and only the new compatibility finding was submitted inline. |
…f the construction-time snapshot
Related: #113054
Depends on #121752 (the diff also shows #121752's commits until it is merged; the new commits here are 3433f8c and 0aa9aa1).
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
S3Queue:
tracked_files_limitcan now be changed withALTER TABLE ... MODIFY SETTINGfor tables in ordered mode. Also fixedSYSTEM FLUSH OBJECT STORAGE QUEUEin exclusive mode aborting on the first retryable failure.Detailed description
This is a Phase 2 follow-up from the split of #113784.
Problem: since #121752,
tracked_files_limitalso caps the/failedset in ordered mode, but it was missing fromchangeable_settings_ordered_mode, soALTER TABLE ... MODIFY SETTING tracked_files_limit = Nwas rejected for ordered tables (Changing setting tracked_files_limit is not allowed for ORDERED mode).Fix: add
tracked_files_limittochangeable_settings_ordered_mode. The ALTER handler inObjectStorageQueueMetadatais not mode-specific, so no other change is needed.Second fix in this PR (exclusive mode):
ObjectStorageQueueExclusiveFileMetadata::getPathState()hard-codedis_terminal_out = truefor everyFailedstate, while the claim path (setProcessingImpl(),prepareFailedRequestsImpl()) treats a failure as retryable untilretriesreachesmax_loading_retries. SowaitForPathToBeProcessed()could throwABORTEDon the first retryable exclusive failure.getPathState()now reports a failure as terminal only when the retry budget is exhausted, mirroring the claim check.This is the exclusive-mode
getPathState()item that was deferred from #121752 (see the scope discussion in #113784). A regression test for it is intentionally left for a follow-up, as agreed there, because tests that wait across a retryable failure are timing-dependent.Test:
test_ordered_mode_tracked_files_limit_is_alterable(test_failed_files_ttl.py) alters the setting on an ordered table and checks the value in the Keeper metadata.Verification status: the ordered-mode test fails without the fix with the expected error. It has not yet been verified green with the fix; CI results are pending. The test does not cover multi-replica behavior or the cleanup sweep after lowering the limit. The exclusive-mode change is C++ only, not compiled or run locally; CI results are pending.
Not in this PR
LIKE 'prefix/%'filter in SYSTEM DROP, a regression test for the exclusive-mode change, and ordered mode support forfailed_files_ttl_sec.Workflow [PR]
Sync PR [sync-upstream/pr/125604]