Repository navigation
Conversation
…l version 11 The receiver advertised `client_protocol_version=11` to mean "I confirm a relink offer before I promote". Upstream owns that number space (its ceiling is 10) and may assign 11 another wire meaning, so a mixed cluster could pair an upstream receiver's 11 with this build's relink offer, or this build's 11 with an upstream sender's stream shape. The promise now travels as its own request parameter, `cas_capabilities=relink_confirm`: the sender offers a relink only to a receiver that sends it, and answers `server_protocol_version` with upstream's ceiling. The protocol version never selects a relink. Test: test_relink_is_selected_by_the_capability_not_the_version (version 10 with the capability gets the offer; 11 without it gets the bytes and `server_protocol_version=10`; 10 without it gets the bytes). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com> (cherry picked from commit 45a60a3f796a9708a41d439d256f58d15bb2de6f)
…need the CAS lane say so `DataPartStorageOnDiskPacked::resetReader` read the archive index through `readArchive` with the caller's read settings, so every Packed part load opened a full-size, possibly prefetching buffer (the previous reader constructor used `adjustBufferSize(4096)`). The index read gets the small buffer back. 05217 and 05385 printed their expected output when the default disk was not content-addressed or the `cas_packed_mixed` policy was missing, so a lane with a broken fixture passed with no coverage; 05385 and 05301 also lacked `no-fasttest`. `clickhouse-test` gains a positive `cas-storage` tag (skipped unless `--cas-storage`); both tests carry it and fail loudly when the fixture is missing. 05220 asserted nothing: it was written for `choosePartFormatForMutation`, which 476ea80 removed, and 05301 covers a Full source staying Full. `allowsPackedParts` gets a doc comment on `IDisk` and `IMetadataStorage`, and `MetadataStorageFromCacheObjectStorage` and `MetadataStorageWithPathWrapper` forward it like the other capability flags (`wrapWithCache` reuses the CAS storage today, so the default `true` was latent). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com> (cherry picked from commit 294786b1443696dc6a2286a9c33369ef25af4141)
… say where the conflict counter counts `AuditSinkFailureDoesNotFailTheDurableMoveOrDrop`: with an event sink that throws, `moveRefExact` and `dropRefExact` still land and report success, and both audit events reach the sink. Comments: the two-rows-one-manifest branch of `moveRefExact` stays `CORRUPTED_DATA` (the ledger is replayed from the ref log, so only a damaged log gets there; no MergeTree caller keys a rename on the code). `throwCasOwnershipConflict` counts on the throwing thread, which inside an `appendRefOps` builder is the append leader, so per-query attribution is best-effort while the global counter is exact. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com> (cherry picked from commit 50e95e658b95cc88a5730191c3e38586d7be29d7)
… deduplicated INSERT 05394: a mutation of a Full part with five projections costs one `manifest_put`, no `ref_repoint`, no `build_abort`, on both mutation branches (a column no projection uses is updated; an unused column is dropped) — `checkpointTransaction` is a no-op on a content-addressed disk. 05395: a deduplicated `INSERT` (same `insert_deduplication_token` twice) commits its part under `tmp_*` before the parts lock like every other insert; the rejected part's ref is dropped again, so every committed `tmp_*` ref is moved or dropped and none stays. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com>
Three: the manifest, the ref-log append that publishes the part under its temporary name, and the ref-log append that moves it to its final name. A protocol change (one append per part, CAS-347) shows up here as a number. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com>
The Full and Packed storages carried the same body (no-op on a content-addressed disk, upstream commit+begin otherwise); it lives in `DataPartStorageOnDiskBase` now. Pinned by 05394 (one manifest per mutation with projections) and 05000. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com>
…rade Both builds speak replication protocol version 10 with different meanings, so a 26.6.x replica fetching from a 26.8 server can fail until the upgrade completes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com>
k-morozov
self-requested a review
October 27, 2026 07:36
9 of 30 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seven commits on top of #2647: the fetch-by-relink promise moves from replication protocol version 11 to a request capability, Packed part loads read the archive index with a small buffer, and the CAS stateless lane stops passing silently without its fixture. The branch carries the commits of #2647 (and of #2579 under it) until they merge; the series is the 7 commits starting at "CAS: gate fetch-by-relink on a capability, not on replication protocol version 11".
Changes
cas_capabilities=relink_confirm; the sender offers a relink only to a receiver that sends it and answersserver_protocol_versionwith upstream's ceiling (10).client_protocol_version11 no longer selects anything, so a mixed cluster with an upstream build cannot pair the number with the relink stream shape.DataPartStorageOnDiskPacked::resetReaderreads the archive index with a 4 KiB buffer instead of the caller's full-size, possibly prefetching one.checkpointTransactionhas one body inDataPartStorageOnDiskBase(no-op on a content-addressed disk) instead of two identical overrides.allowsPackedPartsis forwarded byMetadataStorageFromCacheObjectStorageandMetadataStorageWithPathWrapperlike the other capability flags.clickhouse-testgains the positivecas-storagetag (skipped unless--cas-storage); 05217 and 05385 fail loudly without the CAS fixture instead of printing the expected output; 05220 removed (it asserted nothing after 476ea80; 05301 covers a Full source staying Full). New oracles: 05394 (onemanifest_putper mutation with projections), 05395 (a deduplicatedINSERTleaves no committedtmp_*ref), 05396 (three root-object PUTs perINSERT); gtestAuditSinkFailureDoesNotFailTheDurableMoveOrDrop;test_relink_is_selected_by_the_capability_not_the_version.Risks / notes
--cas-storageand the CAS fixture of the stateless job; without the flag they are skipped, with the flag and no fixture they fail.Testing
CAS*2703/2703; stateless 20/20 (05000, 05004, 05054, 05218, 05219, 05301, 05386–05392, 05394–05396, 04284, 04285, 04292, 04299); integrationtest_cas_replicated_relink19/19,test_cas_ref_move_compat,test_cas_s3/test.py::test_cas_s3_packed_parts.Related: #2647 (base: ref-log owner Move)
Related: #2579 (packed parts)
Related: #2540
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Replica fetch-by-relink on content-addressed disks is negotiated by a request capability instead of replication protocol version 11, so mixed clusters with upstream builds never misread the number. Loading a Packed part reads the archive index with a small buffer.
Documentation entry for user-facing changes
docs/en/antalya/cas/architecture/replication.md(26.6.x and 26.8 servers during an upgrade),docs/en/antalya/cas/configuration.md.CI/CD Options
Exclude tests:
Regression jobs to run:
🤖 Generated with Claude Code