Skip to content

Docs: document patch parts for lightweight deletes - #121997

Merged
dhtclk merged 6 commits into
masterfrom
codex/lightweight-delete-patch-docs
Sep 25, 2026
Merged

dhtclk merged 6 commits into
masterfrom
codex/lightweight-delete-patch-docs

Conversation

@dhtclk

@dhtclk dhtclk commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

The lightweight delete guide omitted patch parts and lightweight_delete_mode. Add a short explanation and link to the existing setting reference and lightweight update requirements. Qualify mutation-specific behavior and clarify replica visibility and physical cleanup.

The change is limited to the guide snippet. No C++ source or generated reference changes. Checked the linked pages and anchors and ran git diff --check.

Reference: https://clickhouse.com/blog/updates-in-clickhouse-2-sql-style-updates#lightweight-deletes-are-now-even-lighter
Reference: https://clickhouse.com/docs/reference/settings/session-settings/lightweight#lightweight_delete_mode

Changelog category (leave one):

  • Documentation (changelog entry is not required)

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

Document patch parts and link to lightweight_delete_mode in the lightweight delete guide.


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

Version info

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

@mintlify

mintlify Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
ClickHouse-docs 🟢 Ready View Preview Sep 24, 2026, 4:58 PM

@clickhouse-gh

clickhouse-gh Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ef5e46c]

Summary: ✅


AI Review

Summary

This PR updates the lightweight delete guide to describe lightweight_delete_mode, patch-part cleanup, and replica visibility. The new guide text is broadly accurate, but the change leaves the autogenerated DELETE statement reference on the old mutation-only description, so two official docs for the same statement now disagree about how lightweight DELETE executes.

Findings

⚠️ Majors

  • [docs/snippets/delete.mdx:37, src/Parsers/ParserDeleteQuery.cpp:139-197] The guide now promises that lightweight DELETE can run through patch parts under lightweight_delete_mode, but the structured docs behind /reference/statements/delete and system.documentation still say lightweight DELETE is always a mutation and is always translated to ALTER TABLE ... UPDATE. That leaves users with contradictory guidance about prerequisites, replica visibility, cleanup, and the internal translation of DELETE.
    Suggested fix: update the registerStatement("DELETE", ...) documentation in src/Parsers/ParserDeleteQuery.cpp in the same PR instead of limiting the patch-part explanation to docs/snippets/delete.mdx.
Final Verdict

⚠️ Changes requested. The guide change should not merge while the autogenerated DELETE reference and system.documentation entry still describe a different execution model.

@clickhouse-gh clickhouse-gh Bot added the pr-documentation Documentation PRs for the specific code PR label Sep 24, 2026
Comment thread docs/snippets/delete.mdx

If you need to guarantee that your data is deleted from storage in a predictable time, consider using the table setting [`min_age_to_force_merge_seconds`](/reference/settings/merge-tree-settings/min-age#min_age_to_force_merge_seconds). Or you can use the [ALTER TABLE ... DELETE](/reference/statements/alter/delete) command. Note that deleting data using `ALTER TABLE ... DELETE` may consume significant resources as it recreates all affected parts.

## Choose the delete mode {#lightweight-delete-mode}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This updates only the guide snippet, but the published statement reference at /reference/statements/delete is autogenerated from src/Parsers/ParserDeleteQuery.cpp and still says that lightweight DELETE is always mutation-based. After this merges, the guide and the reference page will disagree about lightweight_delete_mode, patch-part prerequisites, and the internal translation of DELETE. Please update the structured statement docs in registerStatement("DELETE", ...) in the same PR so the reference page stays aligned.

Comment thread docs/snippets/delete.mdx Resolved
Comment thread docs/snippets/delete.mdx Resolved
@clickhouse-gh clickhouse-gh Bot added the comp-documentation Documentation (docs, examples, READMEs). label Sep 24, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 339da76a2 with master 596f844fb (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

7 translation units recompiled, 7 s compile time in total, 7 of them have a recent master baseline.

Job report

@Blargian Blargian self-assigned this Sep 25, 2026
@dhtclk
dhtclk marked this pull request as ready for review September 25, 2026 15:09
@dhtclk
dhtclk enabled auto-merge September 25, 2026 15:09
@dhtclk
dhtclk added this pull request to the merge queue Sep 25, 2026
Merged via the queue into master with commit 60c9760 Sep 25, 2026
176 checks passed
@dhtclk
dhtclk deleted the codex/lightweight-delete-patch-docs branch September 25, 2026 15:26
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 25, 2026

This branch was successfully deployed

1 active deployment
staging - docs — ef5e46cb Deployed Sep 25, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-documentation Documentation (docs, examples, READMEs). pr-documentation Documentation PRs for the specific code PR 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.

3 participants