Skip to content

Fix false positive chassert in S3Queue finalizeProcessed - #96926

Merged
alexey-milovidov merged 2 commits into
masterfrom
fix-s3queue-finalizeProcessed-assertion
Feb 15, 2026
Merged

alexey-milovidov merged 2 commits into
masterfrom
fix-s3queue-finalizeProcessed-assertion

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Feb 15, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Remove overly strict chassert in ObjectStorageQueueIFileMetadata::finalizeProcessed that races with the cleanup thread
  • When s3queue_tracked_files_limit is set, the cleanup thread can remove a processed node before finalizeProcessed verifies its existence, causing a false positive exception in sanitizer builds
  • This was observed in test_max_set_size (10 files, limit 9, cleanup every 50ms): the oldest processed node gets cleaned up before the assertion runs

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=96881&sha=0dcc3bb62432be0eec7619c833f5d33f1d20f2fe&name_0=PR&name_1=Integration%20tests%20%28amd_asan%2C%20db%20disk%2C%20old%20analyzer%2C%206%2F6%29
#96881

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

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)

🤖 Generated with Claude Code

Version info

  • Merged into: 26.2.1.723

…h cleanup thread

The `chassert` in `finalizeProcessed` checked that `processed_node_path` exists
after the multi-request that creates it. However, the cleanup thread
(controlled by `s3queue_tracked_files_limit` and `s3queue_cleanup_interval_*`)
can remove the processed node before `finalizeProcessed` runs, causing a false
positive exception in sanitizer builds.

This was observed in tests with `s3queue_tracked_files_limit=9` and 10 files,
where the cleanup thread (running every 50ms) would remove the oldest processed
node before the assertion could verify its existence.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=96881&sha=0dcc3bb62432be0eec7619c833f5d33f1d20f2fe&name_0=PR&name_1=Integration%20tests%20%28amd_asan%2C%20db%20disk%2C%20old%20analyzer%2C%206%2F6%29

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Feb 15, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [79adfaf]

Summary: ✅

@alexey-milovidov alexey-milovidov self-assigned this Feb 15, 2026
@alexey-milovidov
alexey-milovidov merged commit b468ba2 into master Feb 15, 2026
130 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix-s3queue-finalizeProcessed-assertion branch February 15, 2026 13:42
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants