Skip to content

s3queue: fix cleanup of stale processing nodes - #101230

Merged
kssenii merged 1 commit into
masterfrom
s3-queue-fix-race-on-cleanup
Mar 31, 2026
Merged

kssenii merged 1 commit into
masterfrom
s3-queue-fix-race-on-cleanup

Conversation

@kssenii

@kssenii kssenii commented Mar 30, 2026 •

Copy link
Copy Markdown
Member

Linked issues

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.4.1.443
  • Backported to: 26.3.3.17, 26.2.7.20, 26.1.8.22

@clickhouse-gh

clickhouse-gh Bot commented Mar 30, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [2c1c57b]

Summary: ❌

job_name test_name status info comment
Integration tests (amd_llvm_coverage, 2/5) failure
test_overcommit_tracker/test.py::test_user_overcommit FAIL cidb IGNORED
Stress test (amd_debug) failure
Logical error: '(isConst() || isSparse() || isReplicated()) ? getDataType() == rhs.getDataType() : typeid(*this) == typeid(rhs)' (STID: 2508-35cc) FAIL cidb, issue ISSUE EXISTS
Stress test (arm_tsan) failure
Hung check failed, possible deadlock found FAIL cidb IGNORED
Stress test (arm_msan) failure
MemorySanitizer: use-of-uninitialized-value (STID: 1003-358c) FAIL cidb, issue ISSUE EXISTS
Finish Workflow failure
python3 ./ci/jobs/scripts/workflow_hooks/new_tests_check.py failure IGNORED

AI Review

Summary

This PR fixes a race in ObjectStorageQueueMetadata::cleanupPersistentProcessingNodes by deleting stale processing nodes with a version check (tryRemove(node, version)) and treating ZBADVERSION as a benign concurrent-update outcome. The change is small, targeted, and improves correctness under concurrent workers without widening failure modes.

ClickHouse Rules
Item Status Notes
Deletion logging ✅
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Mar 30, 2026
@clickhouse-gh

clickhouse-gh Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.10% 84.10% +0.00%
Functions 90.90% 90.90% +0.00%
Branches 76.70% 76.70% +0.00%

Changed lines: 88.24% (30/34) · Uncovered code

Full report · Diff report

@kssenii
kssenii requested a review from bharatnc March 31, 2026 09:48
@bharatnc bharatnc self-assigned this Mar 31, 2026
@kssenii kssenii added pr-must-backport Pull request should be backported intentionally. Use this label with great care! v25.12-must-backport v25.10-must-backport labels Mar 31, 2026
@kssenii
kssenii added this pull request to the merge queue Mar 31, 2026
Merged via the queue into master with commit 57aeeae Mar 31, 2026
155 of 160 checks passed
@kssenii
kssenii deleted the s3-queue-fix-race-on-cleanup branch March 31, 2026 11:24
@robot-ch-test-poll robot-ch-test-poll added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Mar 31, 2026
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 31, 2026
clickhouse-gh Bot added a commit that referenced this pull request Mar 31, 2026
Backport #101230 to 26.2: s3queue: fix cleanup of stale processing  nodes
clickhouse-gh Bot added a commit that referenced this pull request Mar 31, 2026
Backport #101230 to 26.3: s3queue: fix cleanup of stale processing  nodes
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Apr 7, 2026
kssenii added a commit that referenced this pull request Apr 8, 2026
Backport #101230 to 26.1: s3queue: fix cleanup of stale processing  nodes
alexey-milovidov added a commit that referenced this pull request Apr 29, 2026
- Fix typo: `behavoir` → `behavior` (also `prevent` → `prevents`).
- Replace placeholder entry for `#100909` with description of the
  `processAndOptimizeTextIndexFunctions` fix when
  `query_plan_merge_expressions = 0`.
- Replace placeholder entry for `#101230` with description of the
  `S3Queue` stale processing nodes cleanup fix.
- Rewrite the row-policies-in-`query_log` entry (`#101044`) for
  clarity, fixing typos (`sub queries`, `etc..to`, `palnner`,
  `were planner`).

PR: #103729

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo v25.12-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants