Skip to content

Fix projections returning lightweight-deleted rows after a mutation rebuilds them on a Wide part - #111809

Merged
george-larionov merged 25 commits into
ClickHouse:masterfrom
groeneai:fix-111791-lwd-rebuild-normal-projection-stale
Nov 12, 2026
Merged

george-larionov merged 25 commits into
ClickHouse:masterfrom
groeneai:fix-111791-lwd-rebuild-normal-projection-stale

Conversation

@groeneai

@groeneai groeneai commented Jul 24, 2026 •

Copy link
Copy Markdown
Collaborator

Closes: #111791
Related: #118375

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):

Fixed projections returning rows removed by a lightweight DELETE after ALTER UPDATE, MATERIALIZE PROJECTION or CLEAR COLUMN rebuilt them on a Wide part. A query with apply_deleted_mask = 0 no longer uses projections when the table has lightweight-deleted rows, since projections do not store them. On release branches this also fixes a normal projection without a WHERE keeping the rows removed by a rebuild-mode lightweight DELETE, which #118375 fixed on master.

Description

On 26.9.16.11 and on master, after a lightweight DELETE, a projection rebuilt by ALTER UPDATE, MATERIALIZE PROJECTION or CLEAR COLUMN on a Wide part returns the deleted rows, and a query with apply_deleted_mask = 0 served from a projection misses them.

#111791 itself was fixed on master by #118375; this PR also fixes it on release branches when backported.

A mutation that rewrites only some columns of a Wide part gave the projection rebuild no _row_exists; MutationsInterpreter now reads it in a readonly stage. ProjectionDescription::calculateByQuery filters its input by _row_exists for every projection type, after _part_offset is generated so the surviving rows keep their parent offsets.

EXPLAIN WHATIF handles lightweight-deleted rows since #125792; here WhatIfProjectionEstimator only stops reading _row_exists twice when the projection stores it, which fails an assertion on master.

Backports: against master, this diff removes the WHERE _row_exists = 1 injection and the FetchColumns filter that #118375 added to calculateByQuery; release branches have only the injection. A backport needs the calculateByQuery changes from 8b8a425 and 2608c7a (and their follow-ups 7a9c4d6, deec4d0) applied to the pre-#118375 code.

Fixing affected projections rebuilt prior to this fix

Projections built before this fix can still contain lightweight-deleted rows: normal projections rebuilt by a lightweight DELETE with lightweight_mutation_projection_mode = 'rebuild', and any projection rebuilt by ALTER UPDATE, MATERIALIZE PROJECTION or CLEAR COLUMN on a Wide part after a lightweight DELETE. Upgrading does not repair them. A merge of the part rebuilds them, except with deduplicate_merge_projection_mode = 'ignore', where they stay stale permanently. To repair them directly:

ALTER TABLE t CLEAR PROJECTION p;
ALTER TABLE t MATERIALIZE PROJECTION p;

MATERIALIZE PROJECTION alone does not rebuild an existing projection part.


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

Version info

  • Merged into: 26.11.1.2120-master (included in 26.11 and later)
  • Backported to: 26.10.8.5, 26.9.33.15, 26.8.41.17

… mode)

A normal (non-aggregate) projection with no WHERE is calculated at
QueryProcessingStage::FetchColumns, which stops before the WHERE step. The
lightweight-delete rebuild path injected WHERE _row_exists = 1 into the
projection query to drop deleted rows, but at FetchColumns that filter was
never applied, so the projection was rebuilt from all rows including the
deleted ones and a projection-served query could return deleted rows.

The deletion mask is a data-level filter independent of the projection query,
so for the FetchColumns path drop the deleted rows from the input block
directly. The _part_offset column, when present, is filtered by the same mask
so surviving rows keep their original parent offsets. FetchColumns is kept
because the projection part is sorted afterwards by writeTempProjectionPart.

Filtered and aggregate projections already ran at WithMergeableState and
applied the injected filter correctly; that path is unchanged.

Closes: ClickHouse#111791

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. CREATE TABLE ... PROJECTION p (SELECT id,g,v ORDER BY (g,id)) ENGINE=MergeTree ORDER BY id SETTINGS lightweight_mutation_projection_mode='rebuild', index_granularity=4; INSERT ... numbers(100); DELETE WHERE id%11=0 SETTINGS mutations_sync=2; then system.projection_parts.rows = 100 (should be 90) and a projection read-in-order returns deleted id=44.
b Root cause explained? A normal projection with no WHERE is calculated at QueryProcessingStage::FetchColumns, which stops before the WHERE step. The rebuild path injected WHERE _row_exists = 1 to drop deleted rows, but at FetchColumns that filter is never applied, so the projection is rebuilt from all rows including the deleted ones.
c Fix matches root cause? Yes. The deletion mask is a data-level filter independent of the projection query, so for the FetchColumns path the deleted rows are dropped from the input block directly. No assertion widening, no tag, no data reduction.
d Test intent preserved / new tests added? New test 04627_lwd_rebuild_normal_projection_no_where added (Compact + Wide + a _part_offset projection): asserts system.projection_parts.rows, a forced projection read-in-order excludes deleted rows, projection == no-projection equality, and (offset case) _part_offset == _parent_part_offset for every surviving row. No existing test weakened.
e Both directions demonstrated? Yes. Pristine: test FAILS (projection rows 100, deleted leaked=1, Compact+Wide). Fixed: test PASSES; 50/50 randomized runs pass.
f Fix is general across code paths? Yes. Both Compact (MutateAllPartColumns) and Wide (MutateSomePartColumns) funnel through calculateByQuery; both fixed. Aggregate and filtered (WHERE) projections already ran at WithMergeableState and applied the injected filter correctly — that path is unchanged.
g Fix generalizes across inputs? Yes. Verified matrix: normal-no-WHERE (Compact/Wide), normal ORDER BY tup.a subcolumn, _part_offset projection, aggregate, filtered-WHERE, non-LWD MATERIALIZE (keeps all rows — filter branch not taken since _row_exists absent), DELETE-all-rows edge (0 rows, no crash). _row_exists const-folding handled via convertToFullColumnIfConst.
h Backward compatible? Yes. Pure bug fix; makes rebuild mode behave as documented. No setting/default/format change; no SettingsChangesHistory.cpp change needed.
i Invariants and contracts preserved? Yes. _part_offset is filtered by the same mask so surviving rows keep their original parent offsets (verified: _part_offset == _parent_part_offset for all survivors). All source columns filtered by one mask so block column sizes stay equal; the ProjectionDataSink max-rows invariant still holds (filtered input <= original). WithMergeableState and non-LWD paths untouched.

Session id: cron:clickhouse-author-slot-1:20260724-135200

@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review — adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 4 findings across 1 full pass + 1 fix round + 1 delta recheck).

# Sev Finding Verdict Evidence / action
1 ⚠️ Read assertions used optimize_use_projections = 1 (permits base-table fallback) so they did not prove the projection is actually read. AGREE — fixed EXPLAIN confirmed the read uses ReadFromMergeTree (p) only with force_optimize_projection = 1; added it to all projection-read assertions. On pristine the leak assertion now reports 1 (was 0), proving the read is exercised.
2 ⚠️ Wide table did not pin min_bytes_for_full_part_storage; the runner randomizes it, so Packed storage could reroute to MutateAllPartColumns and lose the Wide/MutateSomePartColumns coverage. AGREE — fixed Pinned min_bytes_for_full_part_storage = 0 on both tables and added a part_storage_type assertion (both Full). Explicit CREATE ... SETTINGS take precedence over runner randomization.
3 💡 The source-filter rationale was repeated in two long comments. AGREE — fixed Consolidated to one concise comment at the flag and one at the filter block; formatted QueryProcessingStage::FetchColumns as inline code.
4 ⚠️ Test did not exercise the promised _parent_part_offset preservation (projections omitted _part_offset, so with_parent_part_offset stayed false). AGREE — fixed Added a third table with PROJECTION (SELECT a, b, _part_offset ORDER BY b); asserts 0 deleted rows in the projection and sum(l._part_offset = r._parent_part_offset) = count() via mergeTreeProjection. Verified the fix keeps all 90 survivors' offsets correct; 50/50 randomized pass.

Severity: ❌ blocker / ⚠️ major / 💡 nit.

Session id: cron:clickhouse-author-slot-1:20260724-135200

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @CurtizJ — could you review this? A normal projection with no WHERE is rebuilt at FetchColumns on a lightweight DELETE, which skips the injected _row_exists = 1 filter, so the rebuilt projection kept the deleted rows and a projection read-in-order returned them (issue #111791). Fix drops the deleted rows from the input block directly for that path; filtered/aggregate projections (WithMergeableState) are unchanged.

@clickhouse-gh

clickhouse-gh Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [e4e17f6]

Summary: ✅


AI Review

Summary

Reviewed e4e17f6587cdd98cd909c238dfe59e4c00369d4b. The change carries the deletion mask into partial mutation rebuilds, filters projection inputs while preserving parent offsets, prevents projection optimization with apply_deleted_mask = 0 on tables with lightweight deletes, and avoids a duplicate mask read in EXPLAIN WHATIF. No new inline findings. One previously reported mutation failure remains; request changes until its separate fix is included.

Missing context / blind spots
  • ⚠️ No local build or runtime tests were run; runtime evidence comes from the existing CI reports and regression tests. The commit-order reproduction needs verification after its dependency is included.
Findings

⚠️ Majors

  • src/Interpreters/MutationsInterpreter.cpp:1879, src/Storages/MergeTree/MutateTask.cpp:3278 — Rebuilding another projection can still leave the mutation retrying indefinitely when a commit-order projection is missing. [dismissed by author -- https://github.com/Fix projections returning lightweight-deleted rows after a mutation rebuilds them on a Wide part #111809#discussion_r4225293971] The current code still schedules the missing commit-order projection without registering its required columns before dependency stages are built; the added readonly stage supplies only _row_exists. Missing _block_number / _block_offset then reach getPhysical, which throws NO_SUCH_COLUMN_IN_TABLE. Thus MATERIALIZE PROJECTION on a Wide part with lightweight-deleted rows can fail instead of completing the rebuild. The author chose a separate fix, but Rebuild broken and missing commit-order projections from the part's data in a partial mutation #124912 remains open and its dependency-registration change is absent from this head. Include that fix and its focused regression coverage. The author-resolved thread was left unchanged; the existing bot reply already explains the outstanding dependency.
Final Verdict

⚠️ Request changes. Include the dependency fix from #124912 and verify the missing commit-order projection case. No additional inline comments or thread replies were posted.

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jul 24, 2026
Comment thread src/Storages/ProjectionsDescription.cpp Resolved
@clickhouse-gh

clickhouse-gh Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.20% 86.20% +0.00%
Functions 92.00% 92.00% +0.00%
Branches 78.40% 78.30% -0.10%

Changed lines: Changed C/C++ lines covered: 18/18 (100.00%) · Uncovered code

Full report · Diff report

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 8b8a425

CI is finished. Finish Workflow passed; all builds, integration, unit, fuzzer, and flaky-check runs are green. The new 04627_lwd_rebuild_normal_projection_no_where test and the flaky-check shard are clean. The three red jobs below are pre-existing trunk flakes/regressions unrelated to this change (projections / lightweight DELETE); each has an owner:

Check Failure Reason Owner
Stateless (amd_llvm_coverage, old analyzer, s3, DBReplicated, WasmEdge, parallel, 2/3) Server died / incorrect data types (STID 2735-47bf) chronic coverage-shard server death of 03915_exchange_tables_race (EXCHANGE TABLES race, old analyzer); 65 PRs + master in 30d; not caused by this PR a fix task is tracking it (fixing PR link to follow)
Stress test (amd_debug) Logical error: Inconsistent KeyCondition behavior (STID 5182-684a) debug-only monotonicity canary (#90461); compiled out in release, zero correctness impact; fires across many unrelated PRs + master fix in #109023 (open)
Upgrade check (amd_release) Error message in clickhouse-server.log (system.metric_log metadata exceeds max_query_size) trunk regression on the internal system-log rotation ALTER; this branch's base predates the fix fixed by #111703 (merged); a rebase picks it up

None of the failures touch the projection / lightweight-DELETE code path this PR changes.

Session id: cron:our-pr-ci-monitor:20260725-000000

@groeneai

Copy link
Copy Markdown
Collaborator Author

Fixing PR for the 03915_exchange_tables_race coverage-shard server death (Server died / STID 2735-47bf) on this PR's finish ledger: #110048 (merged 2026-07-26).

The return code: 210 / Connection refused line is the downstream symptom of a single server abort, not a separate infrastructure failure: in the failing job's clickhouse-server.err.log there is exactly one aborting query id, and it is

Logical error: 'Arguments of 'multiply' have incorrect data types: 'n' of type 'Int256', '0.123' of type 'Float64''
(query: SELECT n * 0.123 FROM (SELECT * FROM tbl_03007_1))

which is the query #110048 fixes (it restores the per-query storage-cache pinning that #108728 defeated, so a query keeps reading the table version it was planned against when a concurrent EXCHANGE TABLES swaps it). Since that merge, 03915_exchange_tables_race has 874 runs with 0 failures, including 6 master commits on this exact shard that were verified to contain the fix.

@PedroTadim

Copy link
Copy Markdown
Member

@Algunenano the fix is small, maybe you can review this PR?

@PedroTadim

Copy link
Copy Markdown
Member

@CurtizJ this should be easy to review

@groeneai groeneai added the groeneai-origin-unknown PR origin: unclassified (legacy task) label Aug 19, 2026
@clickhouse-gh clickhouse-gh Bot added the comp-projections Projections: precomputed layouts for accelerating queries (projection parts, maintenance). label Sep 4, 2026
@PedroTadim

Copy link
Copy Markdown
Member

@alexey-milovidov you have to be the one to review it 😄

@tangsaidi

Copy link
Copy Markdown

Friendly bump @alexey-milovidov! We’re running into this issue on ClickHouse Cloud and would appreciate a look when you have a chance. Thanks!

@george-larionov george-larionov self-assigned this Oct 6, 2026
@george-larionov

Copy link
Copy Markdown
Member

@groeneai please fix the failing test and update WhatIfProjectionEstimator.cpp if needed

@george-larionov

Copy link
Copy Markdown
Member

The fix now applies the deletion mask in two ways: a source-block filter for normal projections without a WHERE, and the injected WHERE _row_exists = 1 for everything else. The choice depends on filter_deleted_rows_in_source, which must stay in sync with the FetchColumns stage condition below; if one changes without the other, the bug returns. Did you consider these alternatives, and why did you prefer the current approach?

  1. Always pre-filter. Filter source_block by _row_exists for every projection type, after generating _part_offset, and drop the WHERE _row_exists = 1 injection entirely. existing WHERE AND _row_exists = 1 selects the same rows as pre-filtering followed by the existing WHERE, for filtered and aggregate projections alike. This leaves one mechanism and removes the AST rewrite.
  2. Change the stage. Use WithMergeableState whenever _row_exists is present, so the already-injected WHERE is applied, as it is for filtered normal projections (04492_lightweight_delete_filtered_projection). This adds a partial sort that writeTempProjectionPart repeats, and needs a check that _part_offset passes through that stage.
  3. Filter in the caller (MutateTask). Not viable without an API change, since _part_offset is generated inside calculateByQuery from starting_offset and pre-filtering would shift the parent offsets.

Option 1 looks like the simplest correct fix to me, unless there is a reason to keep the aggregate/filtered path untouched (for example, backport risk).

This comment was written by AI.

…jection type

Filter the source block by `_row_exists` for normal, filtered and aggregate
projections alike, and remove the `WHERE _row_exists = 1` AST injection. For a
filtered or aggregate projection the existing `WHERE` then runs on the
surviving rows, which selects the same rows as the old combined condition, and
the deletion handling no longer depends on the stage chosen for the projection.
`FilterDescription` accepts a const, sparse or nullable mask.

`EXPLAIN WHATIF` modelled the old behaviour, where a normal projection without
a `WHERE` kept the deleted rows. Its whole-part scan now reads the materialized
`_row_exists` mask and drops the deleted rows after the read limits are
charged, so a deleted-heavy part still counts every row it scans. A part whose
rows are all deleted gets no projection part from the writer, so it is charged
its parent ranges, as `optimizeUseNormalProjections` does, and when no part
read keeps a row the empirical estimate is declined, since the real optimizer
then rejects the projection.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai

groeneai commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

Both done in 2608c7a.

Design: I took option 1. calculateByQuery now filters the source block by _row_exists for every projection type, after _part_offset is generated, and the WHERE _row_exists = 1 injection is removed, so the deletion handling no longer depends on the processing stage. The mask goes through FilterDescription, which also accepts a const or sparse _row_exists. Compared with the previous head, keyed and keyless aggregate projections (including a part with every row deleted), a filtered projection and a projection index give identical results, with projection on equal to off. When I tried option 2 in July, running the projection ORDER BY inside the calculation failed with NOT_FOUND_COLUMN_IN_BLOCK on a tuple subcolumn key (the users_tuple case in 03254_project_lwd_respects_row_exists), so option 1 is also the smaller change.

Failing test: 05176_hypothetical_projection_estimate_part_layout asserted the old behaviour, where the rebuilt projection kept all 1000 rows. WhatIfProjectionEstimator.cpp needed the matching change: its whole-part scan now drops the materialized deleted rows after the read limits are charged, a part with every row deleted is charged its parent ranges as optimizeUseNormalProjections does, and the empirical estimate is declined when no part keeps a row. The estimate is now 2 marks, equal to the real read. I added a mostly-deleted and all-deleted case to the same test.

The lightweight delete projection tests and the EXPLAIN WHATIF projection tests pass locally.

groeneai and others added 2 commits October 7, 2026 08:47
…ild-normal-projection-stale

# Conflicts:
#	src/Storages/MergeTree/WhatIfProjectionEstimator.cpp
… lightweight deletes

Master's estimator now reads a sample of granules past `projection_scan_budget_rows`
and maps every sampled row to the granule it came from to model the whole part. Since
the projection input drops lightweight-deleted rows, the estimator drops them too, so
the sample no longer lines up with the granules read and the whole-part row count it
scales to still includes the deleted rows. In a debug build this aborts on
`chassert(granule_of_row.size() == data.rows)`, in a release build the estimate is
wrong.

Follow the estimator's existing treatment of offset filters on a sample: report the
estimate as unsupported, before anything is read. The whole-part scan (within the
budget) keeps the exact handling of deleted rows.

05176: master's read-limit check now refuses the 1000-row scan before reading, so the
mostly-deleted case reports that reason instead of the in-scan one. The deleted rows
still count against the limit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai

groeneai commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

Merged master to resolve the conflict with the new sampling in WhatIfProjectionEstimator.cpp. A sampled estimate maps every row it reads to its granule, and dropping deleted rows breaks that (a debug build aborts on granule_of_row.size() == data.rows), so 223b82b reports a sampled estimate as unsupported when the parts read have lightweight deletes, as it already does for offset filters. The whole-part scan is unchanged.

One interaction I left as is: with apply_deleted_mask = 0, a rebuilt projection serves only the surviving rows. On master this already holds for filtered and aggregate projections, and with this PR it holds for normal ones too.

Comment thread src/Storages/ProjectionsDescription.cpp Resolved
…lightweight deletes

A projection part rebuilt by a lightweight delete in `rebuild` mode does not
store the deleted rows, so a read with `apply_deleted_mask = 0` served by a
projection returned only the surviving rows while the base table returned the
deleted ones too. This already held for filtered and aggregate projections,
and the pre-filter in `calculateByQuery` made it hold for normal ones.
`canUseProjectionForReadingStep` now rejects projections for such reads, so
the read falls back to the parent parts. Tables without lightweight deletes
keep using projections.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread src/Storages/ProjectionsDescription.cpp Resolved
@groeneai

groeneai commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - e4e17f6

Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
whose fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

Check / test Reason Owner / fixing PR
Performance Comparison (arm_release, master_head, 5/6) / codecs_t64_select #0 perf, not in this PR's diff: the T64 UInt8 read through loop() (a table with no projection and no mutation) was confirmed slower, 3727 ms against 2689 ms; the same query was slower on 1 other unrelated PR in the last 30 days and passed in 1480 other arm runs this week a fix task is created (investigating at full effort, fixing-PR link to follow here)
Mergeable Check / PR praktika rollups of the row above a fix task is created (the owner of the row above)
Sync - CH Inc sync (private, not actionable by me)

The FAIL rows of Bugfix validation (functional tests, amd64/aarch64) in CIDB are the expected inversion (this PR's tests fail on master); both checks passed. CIDB has no other FAIL or ERROR row on this head.

Session id: cron:our-pr-ci-monitor:20261106-173005

@groeneai

groeneai commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

About the codecs_t64_select #0 row of the ledger above: this is where the code landed in this one build, so no fixing PR will follow. The reference of this job is master 96face4 built with the PR flags. The query decodes a one-bit T64 UInt8 column, and its decode loop is decompressOneBit<UInt8> in CompressionCodecT64.cpp, which this PR does not touch. That function has the same machine code, apart from addresses, in this build, in the reference and in two other PR builds on the same base (0.996x and 0.983x on this query). This build only places it 0x300 bytes higher, with its lookup table at the same address. The job's CPU profile puts the extra time on that function (43 -> 95 samples, no other frame moves by more than 10), the one-bit UInt16, UInt32 and UInt64 queries of the same test ran at 1.00-1.01x, and the main run and all six confirmation restarts (three stack placements, twice) gave 3.64-3.78 s against 2.63-2.72 s. In 30 days of arm runs (about 6,450), this build is the only candidate above 3.0 s. Such single-build reds belong to the dashboard evaluation that @ egor-click is reworking: #122350 (comment)

@george-larionov george-larionov added the pr-performance Pull request with some performance improvements label Nov 11, 2026
@george-larionov
george-larionov added this pull request to the merge queue Nov 12, 2026
Merged via the queue into ClickHouse:master with commit f0f6023 Nov 12, 2026
548 of 550 checks passed
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 12, 2026
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Nov 18, 2026
nickitat pushed a commit that referenced this pull request Nov 19, 2026
…l-projection-stale

Fix projections returning lightweight-deleted rows after a mutation rebuilds them on a Wide part
robot-ch-test-poll4 added a commit that referenced this pull request Nov 19, 2026
Cherry pick #111809 to 26.8: Fix projections returning lightweight-deleted rows after a mutation rebuilds them on a Wide part
robot-clickhouse added a commit that referenced this pull request Nov 19, 2026
…ed rows after a mutation rebuilds them on a Wide part
nickitat pushed a commit that referenced this pull request Nov 19, 2026
…l-projection-stale

Fix projections returning lightweight-deleted rows after a mutation rebuilds them on a Wide part
nickitat added a commit that referenced this pull request Nov 19, 2026
Cherry pick #111809 to 26.9: Fix projections returning lightweight-deleted rows after a mutation rebuilds them on a Wide part
nickitat pushed a commit that referenced this pull request Nov 19, 2026
…l-projection-stale

Fix projections returning lightweight-deleted rows after a mutation rebuilds them on a Wide part
nickitat added a commit that referenced this pull request Nov 19, 2026
Cherry pick #111809 to 26.10: Fix projections returning lightweight-deleted rows after a mutation rebuilds them on a Wide part
robot-clickhouse added a commit that referenced this pull request Nov 19, 2026
…ed rows after a mutation rebuilds them on a Wide part
robot-clickhouse added a commit that referenced this pull request Nov 19, 2026
…ted rows after a mutation rebuilds them on a Wide part
@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 Nov 19, 2026
clickhouse-gh Bot added a commit that referenced this pull request Nov 19, 2026
Backport #111809 to 26.10: Fix projections returning lightweight-deleted rows after a mutation rebuilds them on a Wide part
clickhouse-gh Bot added a commit that referenced this pull request Nov 19, 2026
Backport #111809 to 26.9: Fix projections returning lightweight-deleted rows after a mutation rebuilds them on a Wide part
clickhouse-gh Bot added a commit that referenced this pull request Nov 19, 2026
Backport #111809 to 26.8: Fix projections returning lightweight-deleted rows after a mutation rebuilds them on a Wide part
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-projections Projections: precomputed layouts for accelerating queries (projection parts, maintenance). groeneai-origin-unknown PR origin: unclassified (legacy task) 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-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-performance Pull request with some performance improvements pr-synced-to-cloud The PR is synced to the cloud repo v26.6-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lightweight_mutation_projection_mode = 'rebuild' does not rebuild the projection; stale (deleted) rows returned via projection-based read-in-order

8 participants