Repository navigation
Add leader election for non-replicated MergeTree on shared storage - #101039
alexey-milovidov wants to merge 468 commits into
Conversation
|
Workflow [PR], commit [5951709] Summary: ✅
AI ReviewSummaryAdds experimental Missing context / blind spots
Findings❌ Blockers
Final VerdictStatus: ❌ Block Fence stale loader cleanup, bind deferred backup copies, and reconcile retained |
|
We should assert leadership before every transaction commit, e.g., renaming part for adding it to the working set. |
|
Hi @alexey-milovidov this looks amazing, I was wondering if this would acquire a lease per configured table or one lease for all configured tables? |
|
The Stress test (arm_msan) failure is fixed by #101239, which should be merged first. After it is merged, please update the branch to include the fix. |
|
The MSan stress test failure (MemorySanitizer: use-of-uninitialized-value, STID 4179-5154 or 4148-3044) is a known pre-existing issue unrelated to this PR. Fix: #102158 |
One lease per table, which means all tables are independent. |
This task implements a small building block and does not solve this problem. I imagine that we will have partitioned tables, where the lease is per partition, and every replica acquires a subset of partitions mostly uniformly. If partitions are by a random function, writes can go to any active replica. The decision of which replica to choose for writes could be made by randomly selecting replicas until success and remembering the last successful one to use next time. This allows infinitely scalable tables without Keeper, but only a small number of such tables per server. |
The test used the UUID of `test_takeover_refused_when_dedup_log_cannot_be_read`'s table. `DROP TABLE` leaves the data of a `leader_election` table on the shared storage, so in a run of the whole file the `CREATE TABLE` of this test found the parts of the other one and failed with `INCORRECT_DATA`. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=101039&sha=5310197a5dd842a0199cfad45d5b93a875c88860&name_0=PR&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20targeted%29 PR: #101039 Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
📊 Cloud Performance Report ✅ AI verdict: no significant changes detected. K_source=4 K_base=30 flagged=0/65 clickbench🟢 No significant changes tpch_adapted_1_official🟢 No significant changes Debug info
|
`DetachedNamespaceRollback::renameDirectory` moved the directory first and built the undo record afterwards. Copying the paths and growing the journal allocate memory, so an allocation that failed there (e.g. with `MEMORY_LIMIT_EXCEEDED`) left the move without a record, and a rejected `ATTACH PARTITION` did not undo it. `removeFileIfExists` had the same order, and could lose the content of the file it removed. The record and its slot in the journal are now prepared before the storage is changed. After the change, only the prepared record is moved into the reserved slot, which cannot throw. The failpoint `merge_tree_leader_election_fail_recording_detached_change` fails the preparation once, and `test_attach_partition_undoes_detached_changes_when_lease_goes_stale` checks that a command rejected this way leaves `detached/` as it was. Review thread: #101039 (comment) Co-Authored-By: Claude Fable 5.2 <[email protected]>
…t directory A part of a `leader_election` table is bound to its directory on the shared storage: after a file is opened by the name of the directory, the part storage checks that the name still refers to the directory the part was loaded from (`IDataPartStorage::pinSharedStorageIdentity`). Four opens went to the disk directly and skipped the check: - `IMergeTreeDataPart::getStatisticsPackedReader` reads the index of `statistics.packed`; - `IMergeTreeDataPart::loadStatisticsFile` opens a member of that archive; - `DataPartStorageOnDiskBase::getSkipIndicesPackedReader` reads the index of `skp_idx.packed`; - `DataPartStorageOnDiskPacked::getSkipIndicesPackedReader` reads the same index inside `data.packed`. The column statistics are read on first use. A query on a follower that held a part whose name was then reused by another directory loaded the statistics of the new part into the old one, and `MergeTreeDataSelectExecutor::filterPartsByStatistics` dropped the old part by them: the query returned no rows instead of its row or an error. No column file is opened in that case, so the checks of the column streams did not help. All four now check the directory after the open and before the result is used or remembered, and fail with `DATA_PART_CHANGED_ON_SHARED_STORAGE` like the other opens. The other reads of a part go through `IDataPartStorage::prepareRead` and `readFileIfExists`, which check already, and the caches shared between tables are keyed by the identity of the directory. The index of an archive is read before the check, so the message of the exception no longer says that nothing was read from the other directory: it says that its data was not used. `test_follower_query_does_not_read_reused_part_name` gets a third scenario, `statistics`. The query stops while it is being planned, between taking the parts of the table and pruning them by statistics, with the statistics of the part not loaded yet. Without the fix the query returns an empty result; with it the query fails in `getStatisticsPackedReader`. The scenario does not reach the check in `loadStatisticsFile`, which needs the index to be loaded before the name is reused. Review thread: #101039 (comment) Co-Authored-By: Claude Fable 5.2 <[email protected]>
… is built `MergeTreeData::loadDataPart` built the part first and recorded the identity of its directory on the shared storage afterwards. The builder already reads from the directory: it looks at its files to tell the format of the part, and reads the index of the archive of a `Packed` part. If the directory was replaced by another one with the same name between the two steps, the part was bound to the new directory while it kept what the builder had read from the old one, and the checks that followed compared the new directory with itself. The load of a valid part could then fail on mismatched metadata and the part could be treated as broken. The identity is now taken before the builder, the part is bound to it as soon as it is built, and the directory is checked right there. An identity never comes back to a name, so this proves that the builder read the directory the part is bound to. A mismatch fails the load with `DATA_PART_CHANGED_ON_SHARED_STORAGE`, which is retried, or skips a request that was queued for the previous directory. No test is added: reaching the window needs a pause inside `loadDataPart`, a second table that refreshes the disk of the follower meanwhile, and a truncate and a restart of the leader to reuse the name. Review thread: #101039 (comment) Co-Authored-By: Claude Fable 5.2 <[email protected]>
… tests `system.parts` stops showing a part when the cleanup takes it for removal, before its files are removed: a query without the `_state` column gets only the active and outdated parts. Two tests took an empty result as "the parts are gone from the storage". `test_follower_query_keeps_outdated_parts` then looked at the storage once, and failed in a local run with "The objects of part all_2_2_0 are left on the storage" while the leader was still removing the batch of three parts. It now polls the storage. `test_follower_query_does_not_read_reused_part_name` restarted the leader at that point. A leader that is restarted in the middle of the removal loads what is left of the parts and does not reuse the name, which would fail the test for a reason unrelated to what it checks. It now also waits until no part directory of the table is left on the storage. Polling the storage during the removal hit another race, in the helper itself: `find_part_object_key_prefix` lists the `prefix.path` objects and then reads each of them, and the leader removed a directory in between (`NoSuchKey`). The listing is now in one place, `directory_paths_on_storage`, which skips a directory that disappeared. Co-Authored-By: Claude Fable 5.2 <[email protected]>
… a grabbed batch on failure Two findings of the review in `StorageMergeTree`. `CHECK TABLE` recomputes and writes `checksums.txt` for a part that has none. Under `leader_election` the write was allowed on the writable leader, but the check of the lease said nothing about the part: it was validated without any tie to the leadership, possibly while this node was a follower. If another leader removed the part and reused its name for other data, and this node took the lease over before the check finished, the checksums of the old part were written into the directory of the new one, because `IMergeTreeDataPart::writeChecksums` opens the directory by its name. The part is now only validated under `leader_election`, on the leader as well, and the missing file is reported. `checksums.txt` is optional for a part. `clearOldPartsFromFilesystem` takes a batch of parts with `grabOldParts`, which moves them to the `Deleting` state, and then looks up the directories of the parts on the shared storage to tell the replaced ones. An exception from these lookups or from the allocations around them (the cleanup also runs in the query of a partition command, under its memory limit) left the batch in `Deleting` forever, since nothing selects a part in that state again: the objects stayed on the storage and the records could hide a part with the same name. Everything between `grabOldParts` and `clearPartsFromFilesystemAndRollbackIfError` is now inside a `try`, and on an exception the parts of the batch that are still `Deleting` return to `Outdated`. Review threads: #101039 (comment) #101039 (comment) Co-Authored-By: Claude Fable 5.2 <[email protected]>
…nder `leader_election` A part that is loaded without `checksums.txt` recomputes the checksums and writes the file, a part without `columns.txt` rebuilds the list and writes it, an empty `checksums.txt` is removed before the rewrite, and a leftover `txn_version.txt.tmp` is removed. Under `leader_election` these changes were allowed when the node held the lease (`MergeTreeData::mayMutateSharedStorage`). The lease says nothing about the part. The loaders, the one of the outdated parts in particular, keep running across the changes of the leadership, and all of these writes open the directory of the part by its name. A follower could finish reading an old part, another leader could remove that part and reuse its name for other data, and the follower could take the lease over before the write: the check passed, and the checksums or the columns of the old part went into the directory of the new one. The identity of the directory that the part is bound to protects only the reads, and the check at the end of `loadDataPart` comes after the write. Under `leader_election` a part no longer changes its files while it is loaded, whoever holds the lease. The recomputed checksums and the rebuilt list of columns are used in memory, as they already were on a follower. This matches `CHECK TABLE`, which stopped writing `checksums.txt` for such tables in the previous commit. Review thread: #101039 (comment) Co-Authored-By: Claude Fable 5.2 <[email protected]>
…ep the publish journal intact on failure Two findings of the review about exceptions that are not what the code took them for. `MergeTreeLeaderElection::parseLeaseContent` caught every exception and reported a parse error, and the heartbeat takes a lease with a parse error over at once, without waiting for it to expire. Reading the strings of a valid lease allocates, so a memory limit hit there was taken for a corrupted lease: a follower tried to claim the lease of a healthy leader at once. The claim is a conditional write against the version of the lease that was read, so it succeeds unless the leader has renewed the lease in between, and then the leader keeps passing its own freshness checks until its next heartbeat while both nodes accept writes. Only `JSONException`, the error of the parser, is caught now. Anything else reaches the handler of the heartbeat, which keeps (or makes) the node a follower and retries. The failpoint `merge_tree_leader_election_fail_parsing_lease` fails the parsing once like such an allocation, and `test_failure_to_read_lease_is_not_a_takeover` checks that the follower counts a failed heartbeat, the lease stays with the leader, and the leader keeps renewing it. With the old `catch (...)` the test fails at the first of these checks: the follower logs "Failed to parse lease file content" and "expired or corrupted ..., trying to claim". In that run the claim itself was rejected, because the leader had renewed the lease in between. `MergeTreeData::Transaction::undoPublishedRenames` abandons the rest of its journal of published parts once the node no longer owns the epoch of the publish. It moved the pointer out of every entry in a loop and cleared the journal after the loop, so an exception in the middle (growing the list of the abandoned parts, the log message) left entries with a moved-out pointer in the journal. The transaction rollback calls the function again and dereferenced the null pointer. The function also took an entry out of the journal before it compared the paths, which allocates, so an exception there lost the entry, and the entries whose undo had failed were kept in a local list that an exception dropped. An entry now leaves the journal only in a step that cannot throw. Abandoning reserves the storage first and then moves the pointer and removes the entry together (`abandonPublishedParts`, also used by `abandonPublishedRenames`). The undo works on the entry in place and erases it once the part is back at its source; the entries whose undo failed stay where they are, in the order of the journal. Review threads: #101039 (comment) #101039 (comment) Co-Authored-By: Claude Fable 5.2 <[email protected]>
The pull request had a conflict with `master`, so its CI did not start. Conflict in `src/Storages/MergeTree/MergeTreeDataWriter.cpp`: `master` moved the computation of the name and of the temporary directory of a new part further down in `writeTempPartImpl`, and this branch had renamed `MergeTreeData::getPostfixForTempInsertName` to `getPostfixForTempPartName` in the lines that were moved. The block stays where `master` put it, and calls the renamed method. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…it into another table `MergeTreeData::cloneAndLoadDataPart` copies the files of a part of another table with `freeze` or `freezeRemote`, which take the files by the name of the directory, one after another, and do not go through the readers of the part. The source may be a part of a `leader_election` table that this server only reads, e.g. in `ALTER TABLE dst ATTACH PARTITION ... FROM src`. If the leader of `src` removed the part and reused its name for other data while the files were being copied, the copy mixed the files of two parts, and it could still load: loading a part compares the sizes of the files, not their contents. The destination then kept rows that never existed. The storage of such a part is bound to its directory on the shared storage (`IDataPartStorage::pinSharedStorageIdentity`), and an identity never comes back to a name. So the directory of the source is checked once after everything is copied and before the copy becomes a part: if the name still refers to it, every file was taken from it. Otherwise the command fails with `DATA_PART_CHANGED_ON_SHARED_STORAGE`. The check is on the storage of the source part, so it covers `freeze`, `freezeRemote`, and both `Full` and `Packed` sources. For a part that is not bound it does nothing. Only compiled locally: after the merge of `master` the local binary is out of date. Review thread: #101039 (comment) Co-Authored-By: Claude Fable 5.2 <[email protected]>
…s source is checked `DETACH PART` / `DETACH PARTITION` copies the parts into `detached/` with `freeze`, which takes the files of a part one after another by the name of its directory. Under `leader_election` the epoch was checked before the copy of each part and nothing was checked after it. A leader that stalled in the middle of a copy for longer than its lease could continue after another leader had removed the part and reused its name for other data: the rest of the files came from the other part, and the command succeeded with a directory in `detached/` that `ATTACH` accepts, because loading a part compares the sizes of the files, not their contents. Under `leader_election` the copy is now made in two steps. It is written under a `clone_` name, which `ATTACH PARTITION` does not take. Then the directory of the source is checked (the storage of the part is bound to it, and an identity never comes back to a name, so an unchanged directory after the copy means that every file was taken from it), and the leadership epoch of the command is checked again. Only then the copy is renamed to the name of a detached part. If a check fails, the copy stays under the `clone_` name and the command fails: a node that may no longer be the leader does not remove anything by name. The other copies into `detached/` (`broken`, `covered-by-broken` and so on) already have names that `ATTACH PARTITION` does not take. Tables without `leader_election` are not changed. Review thread: #101039 (comment) Co-Authored-By: Claude Fable 5.2 <[email protected]>
`Storage memory check` failed in this pull request: the scenario `07_many_parts.sql` (1000 parts) used 128,040 bytes more than on `master`, 128 bytes per part. The storage of a part (`DataPartStorageOnDiskBase`) got three members for the binding to its directory on the shared storage (`pinSharedStorageIdentity`): a flag, a mutex and an optional string, 72 bytes together. A storage is allocated for every part of every table, with or without `leader_election`, and with the control block of the shared pointer the allocation went from 192 bytes, which is exactly a size class of the allocator, to 264 bytes, which is served from the 320 byte class: the measured 128 bytes per part. The binding is now a single atomic pointer to an immutable identity, null for the storages that are not bound. Reading it needs no lock. Binding a storage again publishes a new identity that keeps the previous one alive until the storage is destroyed, for the threads that have just loaded the pointer. `DataPartStorageOnDiskFull` is 176 bytes instead of 240 (168 without the binding), and `DataPartStorageOnDiskPacked` is 600 instead of 664. One pointer is still 8 bytes more than without the binding, where the allocation fills its size class, so a part costs 32 bytes more than on `master` (the 224 byte class) instead of 128. That is 0.26% in the failed scenario, below the 1% limit of the check. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=101039&sha=29e18188c9e2a75f36696ea8a270a64ef79fec3d&name_0=PR&name_1=Storage%20memory%20check PR: #101039 Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=101039&sha=9b975116cb61387dd409463fc09ddc8fdfc888e5&name_0=PR&name_1=Upgrade%20check%20%28amd_release%29 and provide a fix in a separate PR. If the fix is already in progress, link it here.
The same message failed this check in four other pull requests in the last three days, according to the CI database:
This pull request does not change how projections are parsed. I did not find an open issue for it. |
|
The fix is in progress: #128105. The table comes from my test #128105 writes the setting into |
# Conflicts: # src/Storages/MergeTree/IMergeTreeDataPart.cpp # src/Storages/MergeTree/MergeTreeMarksLoader.cpp
`for (size_t i = n; i-- > 0;)` computes `0 - 1` in `size_t` on its last check. Master now builds with UBSan's unsigned integer overflow check (#120906), which reports it and makes the server die in the targeted stateless tests. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=101039&sha=fb1c7a976a34d6e3b45a92bdcdbe23bc07f95536&name_0=PR&name_1=Stateless%20tests%20%28arm_asan_ubsan%2C%20targeted%29 #101039 Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # src/Storages/MergeTree/checkDataPart.cpp
|
🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=101039&sha=722ca7b09b5aec3db9e78c6136e992107ed36425&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20parallel%29 and provide a fix in a separate PR. If the fix is already in progress, link it here.
|
|
🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=101039&sha=722ca7b09b5aec3db9e78c6136e992107ed36425&name_0=PR&name_1=Performance%20Comparison%20%28arm_release%2C%20master_head%2C%201%2F6%29 and provide a fix in a separate PR. If the fix is already in progress, link it here.
Also, |
|
The fix in progress is mine, #131697 (open, not reviewed yet). It is the same Since #131358 pinned the serial merge (2026-11-13 21:11Z), CIDB has this diff in 8 PRs and 1 master run ( #131697 prices a single-level table of at most 1000 states (1 MiB) from all of its states, so this estimate no longer depends on the sample: |
|
|
🕵 Follow-up on
That is no slowdown (PR/base = 0.96). The other TSV queries of the test in the same CI run are within -2%..+4%. The same query measured -3.1% on the previous head |
The branch was 322 commits behind `master`. The merge has no conflicts. The only failed check on the previous head was `Performance Comparison (arm_release, master_head, 1/6)` with `formats_columns_nullable` query 88, which measures the same on a rerun of the same builds and differs between builds: #101039 (comment) #101039 (comment) Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
Thanks for measuring it. The CI counters agree that this PR does not change the work, and they show where the +28% comes from: where the
Neither this PR nor the test decides where the code lands, so I have no fix PR for this. The performance job leaves rows with the same work and a different code placement to the reviewer (ruling). |
|
🕵 According to the CI database, the same report (STID The fix is in progress: |
Add leader election for non-replicated MergeTree tables on shared object storage (currently
S3;Azureis implemented but not yet enabled, pending test coverage), enabling active/standby failover without external coordination (no Keeper).Uses conditional writes (
If-Match/If-None-Match) on object storage to maintain a lease file with JSON content{"version":1,"leader_id":"...","timestamp":...}. The leader renews its lease periodically; followers monitor and claim leadership when the lease expires.New MergeTree settings:
leader_election(Bool, default false) — enable leader electionleader_election_heartbeat_interval(Seconds, default 10) — lease renewal intervalleader_election_session_timeout(Seconds, default 30) — lease expiry threshold; must be at least 3x the heartbeat intervalWhen not the leader, inserts, merges, and DDL are blocked; background data processing is skipped. Heavy mutations (
ALTER TABLE ... UPDATE/DELETE) are unsupported on the currently enabledS3plain_rewritablemetadata layout, including on the leader, because that layout provides no hard links. Lightweight updates do run on the leader: they write patch parts, need no hard links, and are admission-fenced by the leadership epoch like anINSERT.MOVE PARTITION ... TO TABLEfrom aleader_electiontable into a table withoutleader_electionis rejected.Every disk of the storage policy must be a writable
S3disk withmetadata_type = plain_rewritable,enable_hard_links = false(the link counts of shared blobs are not coordinated between nodes) andmetadata_snapshot_enabled = false(every node that writes to the disk would publish the snapshot of the whole disk without coordination). Other disks are rejected at table creation.Wall-clock synchronization between the nodes is not required: a follower considers the lease expired only after it has observed the same version of the lease file for
leader_election_session_timeouton its own monotonic clock, and the leader stops accepting writes no later than that, measured on its own monotonic clock from the moment before it wrote the lease. Only the rates of the clocks are assumed to be equal.Queries on followers are coordinated with the cleanup on the leader. Every node that is not the leader keeps a small reader object next to the lease (
<lease>_readers/<node>) and rewrites it at every heartbeat. It names the latest write of the lease that the node had read before it listed the storage for its current set of parts, and the outdated parts that its queries still read. The leader removes an outdated part only after every node with an unexpired reader object has refreshed its parts past the replacement of that part and does not list it, so a query on a follower can run longer thanold_parts_lifetime. A reader object expires afterleader_election_session_timeout, like the lease. If a part is removed anyway (the node stalled) and its name is reused, a query that still holds the old part fails withDATA_PART_CHANGED_ON_SHARED_STORAGEinstead of reading the files of the new part.DETACH PARTITION,MOVE PARTITIONand moves between disks still change the storage at once.The same binding of a part to its directory guards the operations that take the files of a part by the name of its directory. A part of a
leader_electiontable that is cloned into another table (ATTACH PARTITION ... FROM,REPLACE PARTITION) is checked after the copy, and the command fails withDATA_PART_CHANGED_ON_SHARED_STORAGEif the directory was replaced meanwhile.DETACH PART/DETACH PARTITIONfirst writes the copy asdetached/clone_<part>, whichATTACH PARTITIONdoes not take, and renames it todetached/<part>only after the source and the leadership epoch are checked; if a check fails, theclone_copy is left in place. A missingchecksums.txtorcolumns.txtis not rewritten for such tables, neither while a part is loaded nor byCHECK TABLE: the values are recomputed in memory, andCHECK TABLEreports the missing file.Closes #91613
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Add
leader_electionsetting for non-replicated MergeTree tables on shared object storage, enabling active/standby failover using conditional writes without external coordination.Documentation entry for user-facing changes
Three new MergeTree-level settings are added:
leader_election(Bool) — When enabled on a non-replicated MergeTree table stored on anS3object storage disk (Azureis implemented but rejected at table creation until it has test coverage), multiple ClickHouse instances sharing the same data path will elect a single leader. Only the leader performs writes and merges. Followers act as read-only replicas and automatically claim leadership when the current leader's lease expires. Heavy mutations (ALTER TABLE ... UPDATE/DELETE) are unsupported on the currently enabledS3plain_rewritablemetadata layout, including on the leader; lightweight updates are supported on the leader.leader_election_heartbeat_interval(Seconds, default 10) — How often the leader renews its lease and followers check for an expired lease.leader_election_session_timeout(Seconds, default 30) — How long a lease remains valid without renewal. Must be at least 3xleader_election_heartbeat_interval.Example, using the same UUID and shared
S3storage policy on each node:Note
High Risk
High risk because it introduces new leader-election coordination and modifies core
MergeTreewrite/DDL/drop and catalog cleanup paths; bugs could cause write unavailability or accidental deletion/incorrect visibility on shared storage.Overview
Adds a Beta
leader_electionmode for non-replicatedMergeTreetables on shared S3/Azure, using a conditional-write lease file to ensure only one instance performs inserts/merges/mutations while followers remain read-only and can take over on failure.Introduces new MergeTree settings (
leader_election,leader_election_heartbeat_interval,leader_election_session_timeout) with validation, newMergeTreeLeaderElection*metrics/events, and follower part-refresh + leader takeover sync to load new parts and advance block counters before enabling writes.Hardens destructive operations for shared-storage tables: blocks most
ALTER/partition-mutation operations andRENAMEunder leader election, gates background processing on leadership, and updates drop/cleanup logic (dropSkipsDataDirectoryCleanup,DatabaseCatalog/StorageTableProxyfail-closed behavior) to avoid recursive deletion or hangs when tables are shared or cannot be materialized. Adds documentation and integration/stateless tests covering failover, metrics, validation, and rejection cases.Reviewed by Cursor Bugbot for commit 78c1252. Bugbot is set up for automated code reviews on this repo. Configure here.
Workflow [PR]
Sync PR [sync-upstream/pr/101039]