Skip to content

Add a test for the deduplication log phantom blob after ALTER MODIFY SETTING - #122432

Merged
alexey-milovidov merged 1 commit into
masterfrom
dedup-log-alter-window-test
Sep 26, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
dedup-log-alter-window-test

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #121670, addressing its review comment about missing coverage for the setDeduplicationWindowSize lazy-open path.

That PR stopped MergeTreeDeduplicationLog::setDeduplicationWindowSize from eagerly opening an appending writer for the unfinished log, but its test covered only the load path. The new test toggles non_replicated_deduplication_window with ALTER TABLE ... MODIFY SETTING on s3_disk, with no inserts between the toggles and a DETACH/ATTACH after each one, and checks that no ATTACH logs "Error while loading MergeTree deduplication log".

Verified locally against MinIO: a binary without the fix logs the error (NoSuchKey) on both reattaches after the ALTER; a binary with the fix logs none.

Related: #121670

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/122432]

Version info

  • Merged into: 26.10.1.764-master (included in 26.10 and later)

… SETTING`

#121670 stopped
`MergeTreeDeduplicationLog::setDeduplicationWindowSize` from opening an
appending writer for the unfinished log eagerly, but its test only covered
the `load` path. Toggle `non_replicated_deduplication_window` on `s3_disk`
without inserts between the toggles, with `DETACH`/`ATTACH` after each one.

Verified locally against MinIO: a binary without the fix logs
"Error while loading MergeTree deduplication log" (`NoSuchKey`) on both
reattaches after the `ALTER`, a binary with the fix logs none.

Related: #121670

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b13d6d4]

Summary: ✅


AI Review

Summary

This PR adds an s3_disk stateless regression test for the MergeTreeDeduplicationLog fix from #121670, specifically the ALTER TABLE ... MODIFY SETTING non_replicated_deduplication_window path after a DETACH/ATTACH leaves the current deduplication log unfinished and writer-less. The test reaches the lazy-open state transition in setDeduplicationWindowSize, verifies that duplicate inserts are still deduplicated after the reattach cycles, and scopes the system.text_log check to the table UUID so it only counts this table's load failures. I did not find a correctness or coverage gap in the added test, and the PR CI is all green.

Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-not-for-changelog This PR should not be mentioned in the changelog comp-testing Test content only (no production code). labels Sep 26, 2026

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

@alexey-milovidov alexey-milovidov self-assigned this Sep 26, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Sep 26, 2026
Merged via the queue into master with commit bfe5a86 Sep 26, 2026
172 checks passed
@alexey-milovidov
alexey-milovidov deleted the dedup-log-alter-window-test branch September 26, 2026 20:39
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 26, 2026
@clickhouse-gh clickhouse-gh Bot added comp-mergetree MergeTree* family: parts, merges, primary index, column statistics, background data transformation. and removed comp-testing Test content only (no production code). labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-mergetree MergeTree* family: parts, merges, primary index, column statistics, background data transformation. pr-not-for-changelog This PR should not be mentioned in the changelog 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