Skip to content

Fsync DETACH PARTITION clone into detached/ to survive power loss - #111426

Merged
Algunenano merged 6 commits into
ClickHouse:masterfrom
groeneai:fork/groeneai/fix-111382-detach-partition-fsync
Aug 3, 2026
Merged

Algunenano merged 6 commits into
ClickHouse:masterfrom
groeneai:fork/groeneai/fix-111382-detach-partition-fsync

Conversation

@groeneai

@groeneai groeneai commented Jul 22, 2026 •

Copy link
Copy Markdown
Collaborator

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

ALTER TABLE ... DETACH PARTITION/PART now fsyncs the clone it creates under detached/ (the part subtree plus the directory chain up to the disk root) when the table's fsync_part_directory setting is enabled, for both Full (directory) and Packed part storage. Previously the clone was never fsynced while the empty covering part that removes the rows from the active set was, so a power loss right after the acknowledgement could destroy the detached data on btrfs (the un-synced clone directory entries roll back, leaving detached/ empty and nothing to ATTACH). Gated on the existing fsync_part_directory setting; default behavior is unchanged.

Description

Closes: #111382

ALTER TABLE ... DETACH PARTITION is not a rename. StorageMergeTree::dropPart/dropPartition execute it as: (1) IMergeTreeDataPart::makeCloneInDetached -> freeze() hardlink-clones the part into detached/<part> and fsyncs nothing; (2) an empty covering part that removes the rows from the active set is committed, which IS fsynced when fsync_part_directory is on; (3) the original part directory is deleted lazily. So the operation's two durable artifacts get opposite treatment: the commit that removes the data is fsynced, the clone that preserves it is not. On btrfs the covering part's per-inode log fsync persists only its own subtree, so the un-synced clone directory entries roll back on power loss: detached/ is empty, the rows are gone from the active set, and the original is loaded as covered/outdated and cleaned up. The only copy of the acknowledged detached data is destroyed. (On ext4/xfs the single journal happens to persist the earlier clone, an ordering accident rather than a guarantee.)

freeze(), when fsync_part_directory is set (and on a local disk, outside an external transaction), now fsyncs:

  1. the clone's part-directory subtree bottom-up (part dir plus projection subdirs, i.e. the hardlink entries);
  2. every ancestor directory from the clone's immediate parent (detached/) up to and including the disk root. fsync(dir) persists the entries inside dir, not dir's own entry in its parent, and detached/ is created at table init without an fsync while normal part commits fsync only the child part dir, so the parent chain must be synced too for the clone to survive on a first-ever detach. freeze() returns before the caller commits the covering part, so this synchronous fsync orders the clone durable before that commit.

There are two independent freeze() implementations and both are fixed:

  • DataPartStorageOnDiskBase::freeze (Full/directory storage, used by DataPartStorageOnDiskFull).
  • DataPartStorageOnDiskPacked::freeze (single data.packed archive storage, chosen when a part satisfies min_bytes_for_full_part_storage/min_rows_for_full_part_storage/min_level_for_full_part_storage). This is a fully independent override that hardlinks/copies data.packed into detached/<part>/ and previously issued no directory fsync, so a DETACH of a Packed part had the same data-loss exposure on power loss. Packed clones store each projection as a <name>.proj subdirectory, so the per-projection freeze clears fsync_part_directory and the top-level walk fsyncs the whole subtree plus ancestor chain exactly once.

The shared directory-sync logic (subtree fsync + ancestor walk) is extracted into a single fsyncFrozenCloneTree() helper that both overrides call. Gated on the existing fsync_part_directory MergeTree setting (default false), so default behavior is unchanged and no SettingsChangesHistory entry is needed. On remote/object-storage disks getDirectorySyncGuard() is a no-op, so the change is local-disk only.

Verified on btrfs over dm-flakey (power cut = drop_writes + unmount without flush, per the xfstests _flakey_drop_and_remount recipe): on the unpatched build the detached data is lost after the cut (detached/ empty, count() = 0, nothing to ATTACH); with the fix the detached part survives and ATTACH PARTITION restores all rows. Also verified via ProfileEvents['DirectorySync'] on the covering empty part's NewPart row in system.part_log: a DETACH fsyncs at least two more directories than a DROP of the same partition (clone leaf plus ancestor), a projection adds one more, and nothing is fsynced with fsync_part_directory = 0, for both Full and Packed storage. Regression test: tests/queries/0_stateless/04622_detach_partition_fsync_part_directory.sql.

This is the DETACH variant of the same unsynced freeze/Backup clone path as #111331 (FREEZE, addressed in #111393). #111393 touches only the FREEZE call site and does not close this: the durability boundary for DETACH is the detached/ clone plus the covering-part ordering. Both PRs add a ClonePartParams.fsync_part_directory field and a freeze() directory-sync; the overlap is a trivial conflict for whichever merges first, and I am happy to consolidate them.

Version info

  • Merged into: 26.8.1.677 (included in 26.8 and later)

@groeneai

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

An independent model reviewed the resulting code before this PR was opened. Findings and dispositions:

Blockers

  • fsync-errors-swallowed (claim: directory-sync errors are swallowed, so freeze returns success and the destructive covering commit proceeds after a failed fsync) — DISAGREE. LocalDirectorySyncGuard's destructor logs and swallows fdatasync/close errors in every existing MergeTree/Distributed durability path, including the covering-part commit this change orders against (DataPartStorageOnDiskBase::rename -> getDirectorySyncGuard), VersionMetadataOnDisk, and DistributedAsyncInsertBatch. There is no throwing directory-fsync primitive in the tree and no call site fails closed on a directory-fsync error. The bug being fixed is that the clone was fsynced zero times; this change adds the fsyncs consistent with the established idiom. Making only this one path fail-closed while the covering commit still swallows would be inconsistent and would not fully close the window. A true fail-closed directory-sync is a codebase-wide change, out of scope here. Noted as a possible follow-up.
  • existing-clone-unsynced (claim: an identical pre-existing broken clone bypasses the new sync) — DISAGREE. getRelativePathForPrefix only early-returns (skipping the clone) under broken && isFullPartStorage && looksLikeBrokenDetachedPartHasTheSameContent, and broken = !prefix.empty(). DETACH PARTITION/PART (this issue) calls makeCloneInDetached("") with an empty prefix, so broken = false and that branch is never taken; the new fsync always runs for the reported path. The skip applies only to the broken/unexpected-part quarantine paths (non-empty prefix), where the source is already known-broken and preservation is best-effort. Pre-existing, different path, out of scope for this fix.

Nits

  • comment-convention — AGREE. Trimmed the duplicated root-cause narrative out of the code comments (it lives in the commit message and this description).
  • generic-freeze-comment — AGREE. Reworded the freeze comment so it no longer implies every caller commits a covering empty part (the clone-replica/broken/unexpected callers do not); it now describes the local durability ordering generically.

Majors (found on recheck)

  • stress-object-storage — AGREE. Stress CI forces object storage as the default MergeTree policy via a server config file, not via --s3-storage/--azure-blob-storage, so the no-object-storage tag (which keys off those args) would not skip the test there; it would run with an object-storage default where the fix intentionally does not fsync, failing the assertions. Fixed by pinning storage_policy = 'default' on the test table.

@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. powercut-btrfs.sh (btrfs over dm-flakey, xfstests _flakey_drop_and_remount) reproduces on demand: baseline loses the data, the fix preserves it. Portable proxy: ProfileEvents['DirectorySync'] for the DETACH query is exact (2 on master, 8/9 with the fix, 0 when the setting is off).
b Root cause explained? Yes. DETACH PARTITION clones the part into detached/ via makeCloneInDetached -> freeze with no fsync, then commits an empty covering part (fsynced) that removes the rows, then lazily deletes the original. On btrfs the covering commit's per-inode-log fsync persists only its own subtree, so the un-synced detached/ clone entries roll back on power loss and the only copy is destroyed.
c Fix matches root cause? Yes. freeze now fsyncs the clone subtree plus the ancestor chain up to the disk root, synchronously before the caller commits the covering part. Not a band-aid (no widened bounds, no data-size change, no tag).
d Test intent preserved / new tests added? Yes. New test 04622_detach_partition_fsync_part_directory.sh asserts the clone durability (ancestor-chain and projection-subtree DirectorySync deltas) and that the data re-attaches. No existing test weakened.
e Demonstrated both directions? Yes. Same harness: baseline -> detached/ empty, count() = 0, nothing to ATTACH (DATA LOST); fix -> detached part present, ATTACH restores 1000 rows (DATA SURVIVED). clickhouse-test: baseline FAIL, fix 50/50 OK.
f General, not a narrow patch? Yes. The fix lives in freeze, the shared owner; all 8 makeCloneInDetached call sites (plain DETACH, Replicated broken/covered-by-broken, unexpected-part) get durable clones. The fsync is added at the durability source, gated on the existing setting, not as a symptom guard.
g Generalizes across inputs? Yes. Projection subdirs covered (recursive sync, verified proj = plain + 1); remote/object disks safely no-op (getDirectorySyncGuard returns null / isRemote); external_transaction path skipped (writes not materialized here); ancestor walk terminates at the disk root "".
h Backward compatible? Yes. Gated on the existing fsync_part_directory MergeTree setting (default false); default behavior byte-identical (DirectorySync = 0 when off). No format/protocol/wire/metadata change, so no SettingsChangesHistory entry.
i Invariants/contracts preserved? Yes. Reuses the same getDirectorySyncGuard primitive the rename commit path uses; children-synced-before-parent ordering; freeze's create()/to_detached semantics untouched; SyncGuardPtr RAII on all paths; no new throw across a noexcept boundary.

Verified on btrfs + dm-flakey: baseline build loses the detached data on power loss (detached/ empty, count() = 0), the patched build recovers all rows via ATTACH. Session id: cron:clickhouse-author-slot-1:20260722-145500

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @Algunenano @CurtizJ - could you review this? ALTER TABLE ... DETACH PARTITION clones the part into detached/ via freeze with no fsync while the covering empty part that removes the rows IS fsynced, so on btrfs a power loss right after the ack rolls back the clone and destroys the only copy. This fsyncs the clone subtree and its ancestor chain in freeze, gated on the existing fsync_part_directory setting. Verified on btrfs + dm-flakey (data lost without the fix, recovered with it). It is the DETACH sibling of #111393 (FREEZE).

@clickhouse-gh

clickhouse-gh Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [8f6e466]

Summary: ❌

job_name test_name status info comment
Stress test (amd_asan_ubsan) FAIL
Hung check failed, possible deadlock found FAIL cidb, issue

AI Review

Summary

This PR makes ALTER TABLE ... DETACH PARTITION/PART persist the clone placed under detached/ when fsync_part_directory is enabled, extends the same durability step to Packed part storage, and adds regression coverage for both storage types. I reviewed the current diff, prior discussion, and the current code paths, and I did not find a remaining correctness issue in the updated implementation.

Missing context / blind spots
  • ⚠️ I did not rerun the external btrfs/dm-flakey power-cut repro or the new stateless test locally; this review is based on the current code, the discussion history, and the green current Praktika reports.
Final Verdict

✅ No actionable findings in the current revision.

@StackSlayerAI

Copy link
Copy Markdown
Contributor

CI Triage (bot) — head edc6e424 — 2026-07-22

Verdict: REAL FAILURE — PR's own test 04622_detach_partition_fsync_part_directory failing

Stateless tests (amd_debug, parallel) and (amd_debug, flaky check) both report repeated failures for 04622_detach_partition_fsync_part_directory (5+ consecutive runs, ~6–8 seconds each).

This test was introduced by this PR ("Fsync DETACH PARTITION clone into detached/ to survive power loss") and is failing consistently, suggesting the feature itself or the test assertions need fixing.

Action needed: Investigate why 04622_detach_partition_fsync_part_directory fails — either the fsync logic does not yet behave as the test expects, or the test needs to be adjusted to match the current implementation.

Run ID: 29938674190

@groeneai

Copy link
Copy Markdown
Collaborator Author

Fixed the flaky-check failure on the new test 04622_detach_partition_fsync_part_directory (pushed f7da54d).

Root cause: the test observes the DETACH directory fsyncs with an aggregate over system.query_log. When the CI runner randomizes parallel replicas on (enable_parallel_replicas=1 + cluster_for_parallel_replicas=parallel_replicas), that aggregate routes to the parallel_replicas cluster, which does not exist on the single-node stateless server, and throws CLUSTER_DOESNT_EXIST. The error hits stderr (clickhouse-test fails on any stderr) and the empty result shifts the shell parse, so every assertion prints a bogus value.

Fix: pin enable_parallel_replicas = 0 in that query's SETTINGS (query-level SETTINGS wins over the runner's --allow_repeated_settings CLI injection). The DirectorySync counts the durability assertion checks are untouched: they are a purely local single-node property and are stable across all randomized MergeTree part-layout settings (Wide/Compact, granularity, hashed filenames, uncompressed marks). Verified 60/60 with full randomization.

Note: the CI --diagnose-random-settings run had attributed this to min_bytes_for_full_part_storage, but that setting is only available in ClickHouse Cloud and is a no-op in OSS (choosePartFormat always returns PartStorageType::Full), so its correlation was a confound of the shared RNG stream; pinning it would not have fixed the flakiness.

@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review (follow-up test fix ebf73cf, click to expand)

An independent model reviewed the resulting code before this push. Findings and dispositions:

Major

  • detach-fsync-oracle (claim: the test can pass without proving the full clone subtree + ancestor chain were synced; the remote-disk branch prints success without inspecting the count) - PARTIAL. The remote-disk branch is a no-op by design: on a remote/object disk freeze() does no directory fsync (getDirectorySyncGuard() returns nullptr; block gated on !disk->isRemote()), so there is nothing to assert there. Bug detection is preserved on the local-disk path: verified the pre-fix binary still FAILS the test on a local disk (DirectorySync=2 < 4). Removed the unused on_proj_remote/off_plain_remote captures the reviewer flagged. The suggested "exact count derived from path depth" was declined: the ancestor-chain depth varies by database engine (Atomic vs Ordinary), which is why the original >= 4 margin was chosen.

Nit

  • pr-contract-mismatch (claim: the title describes only a flaky-test fix while the code is a durability change) - DISAGREE. The reviewer saw only this follow-up commit's message. The PR title/changelog already describe the durability change ("Fsync DETACH PARTITION clone into detached/ to survive power loss"); this commit is a test-only follow-up and does not change it.

Verification (Build IDs recorded): with-fix + local disk PASS; with-fix + remote disk PASS (was the CI failure); pre-fix + local disk FAIL (bug still caught); 50/50 randomized-MergeTree-settings runs PASS.

@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review (test robustness fix 0024305, click to expand)

An independent model reviewed the resulting test before this push. Finding and disposition:

  • detach-fsync-delta-oracle (major, test-liveness) — claim: the relative detach > drop assertion still passes if only the ancestor-chain fsync is removed (clone-leaf sync kept), so it would not catch that partial regression. AGREE. Empirically confirmed: with the ancestor walk removed, detach=3 drop=2 still satisfied detach > drop (test wrongly passed). Strengthened the assertion to detach >= drop + 2 (clone leaf +1 and at least one ancestor +1). Re-verified all three binaries: with-fix detach=8 drop=2 proj=9 -> PASS; ancestor-walk-removed detach=3 drop=2 -> FAIL; freeze-absent detach=2 drop=2 proj=2 -> FAIL. Robustness re-confirmed 60/60 under randomized MergeTree + query settings.

@groeneai

Copy link
Copy Markdown
Collaborator Author

The new test 04622_detach_partition_fsync_part_directory is flaky in CI and I have not been able to reproduce it locally after extensive investigation. Posting what I found in case someone recognizes the mechanism, because the two candidate root causes need opposite fixes.

Symptom (deterministic values, non-deterministic occurrence). In failing runs the DETACH query records ProfileEvents['DirectorySync'] = 2, identical to a plain DROP, while off (fsync_part_directory=0) is 0 and reattach: data preserved always passes. It is flaky within a single job: flaky-check on this head gave tsan 13 FAIL / 5 OK, msan 8/3, asan_ubsan 7/9, debug 6/2. So it is a race, not a randomized-setting effect.

Why this is paradoxical. drop = 2 > 0 proves the part is on a disk that emits DirectorySync (a plain DiskLocal, default policy, is_remote = 0). On that same disk the DETACH should be drop + freeze (locally I always measure detach=8, proj=9, drop=2). detach = 2 means freeze()'s fsync block (syncDirectoryTree + the ancestor-chain walk) contributed 0. But that block runs inline on the query thread, its gate (fsync_part_directory && !external_transaction && !isRemote()) is stable for this table, and LocalDirectorySyncGuard does the fdatasync and the ProfileEvents::increment together in its destructor. So "the block ran but emitted 0 DirectorySync" should be impossible.

Not reproducible in isolation. detach=8 every time across: 150 debug runs, 60 ASAN runs via the runner, every individual MergeTree setting (25+), every session setting (10+), the exact 371 regular + 59 MergeTree randomized settings from a failing run applied together, and 8x concurrent DETACH/fsync load on debug. It only fails in CI under concurrent flaky-check load on sanitizer builds.

The two candidates (opposite fixes).

  • (A) A system.query_log ProfileEvents observability artifact under concurrent sanitizer load: the fsync happened (data is durable) but the QueryFinish row's aggregated ProfileEvents were read before the sync's increment propagated. Fix = make the test retry until the count settles (the 02361_fsync_profile_events pattern).
  • (B) A real intermittent skip of the clone fsync under a race. Fix = in the engine, not the test; a test retry would mask it.

reattach: data preserved cannot distinguish these (it passes whether or not the fsync ran; fsync only matters on power loss). I do not want to push a test-only retry that could hide (B) on a data-loss PR, nor an engine change I cannot back with a repro.

Does detach == drop (freeze DirectorySync attributed as 0) under concurrent sanitizer load look like a known query_log ProfileEvents finalization artifact, or should I treat it as a real intermittent fsync skip? The C++ durability fix itself is unchanged and verified by a btrfs + dm-flakey power-cut test.

@Algunenano Algunenano self-assigned this Jul 23, 2026

@Algunenano Algunenano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@groeneai I cannot accept this as it is with the flaky test. Please download the logs, investigate what happened and what caused it to fail and improve it. If you don't find any information in the CI logs, focus again on reproducing it locally, or looking at settings. The normal (not flaky checks) seem to point to full vs packed part as possible issue (which makes sense).

Also, I find it hard to follow the test. If it's not possible to test with parallel replicas, then disable that directly and explain why, same with object storage, local vs remote. Having workarounds (detach_on_remote) and repeated calls to functions with odd parameters and output makes it hard to read. I'd rather have no functions and sql queries explicitly matching the behaviour, rather than relying on bash

@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review (Gate B) adjudication for b4c6f2b

Follow-up to the two prior test-only attempts. Root cause of the 04622 flakiness: the test read
ProfileEvents['DirectorySync'] for the DETACH from system.query_log, whose per-query counters are
an asynchronous snapshot of the query's thread-group counters. The DETACH clone-freeze runs in a nested
ProfileEventsScope on the query thread, and under CI parallel load those increments do not reliably
reach that snapshot, so the observed count collapses to the covering-empty-part baseline (detach=2 drop=2,
the exact CI signature). This is DETACH specific (02361_fsync_profile_events reads the same counter from
query_log for an INSERT and is not flaky). Fix: read DirectorySync from system.part_log instead, whose
ProfileEvents come from a synchronous profile_events_scope.getSnapshot() on the covering part's NewPart
row, deterministic regardless of the thread-group snapshot timing (same pattern as
02378_part_log_profile_events).

Second-model review (codex): 1 finding, adjudicated.

id severity verdict resolution
part-log-row-liveness major AGREE The retry loop now waits on the NewPart row's presence (count() >= 1), not on the sum value (sum() over zero rows is also 0, which would let a still-missing row pass the fsync-off assertion vacuously). If the row never materializes the counts become a -1 sentinel and every assertion fails loudly.

Both directions re-verified through the real clickhouse-test harness: with the fix, 20x randomized PASS
(and 50x under concurrent detach load, 0 failures); with the freeze block reverted, 3x FAIL with
detach=2 drop=2, matching the CI signature.

@groeneai
groeneai force-pushed the fork/groeneai/fix-111382-detach-partition-fsync branch from b4c6f2b to 473299d Compare July 23, 2026 13:10
@groeneai

Copy link
Copy Markdown
Collaborator Author

@Algunenano thanks, addressed both points in 473299d.

Root cause (investigated). I downloaded the logs and reproduced both directions locally. The failure is not full-vs-packed: min_bytes_for_full_part_storage is a Cloud-only no-op in OSS (MergeTreeData::choosePartFormat always returns Full), so the CI --diagnose-random-settings culprit was an RNG-stream confound. The real cause is where the count was read from. The test read ProfileEvents['DirectorySync'] for the DETACH from system.query_log, whose per-query counters are an async snapshot of the query's thread-group counters taken at query finish. The DETACH clones the part inside a nested ProfileEventsScope on the query thread (StorageMergeTree::dropPartition), and under CI parallel load those clone-freeze increments do not reliably reach the thread-group snapshot, so the count collapsed to the covering-empty-part baseline (detach=2 drop=2, exactly the CI signature in 43/43 failing runs). It is DETACH specific: 02361_fsync_profile_events reads the same counter from query_log for an INSERT and is not flaky.

The fix reads DirectorySync from system.part_log instead. There it comes from a synchronous profile_events_scope.getSnapshot() written on the covering part's NewPart row, so it captures the whole operation deterministically (same pattern as 02378/03221).

Readability. Rewrote it as plain SQL, one table per scenario, no bash helper and no runtime detach_on_remote workaround. The confounders are now disabled at the tag level with a comment each: no-parallel-replicas (the part_log read otherwise routes to the missing parallel_replicas cluster on the single-node server), no-object-storage, and no-random-settings/no-random-merge-tree-settings (fixes the part layout so the directory counts are deterministic).

Verified both directions: with the fix all assertions hold (30x randomized plus concurrent detach load, 0 failures); with the freeze block reverted clone_synced/proj_subtree_synced are false, matching the CI failure.

@Algunenano

Copy link
Copy Markdown
Member

Root cause (investigated). I downloaded the logs and reproduced both directions locally. The failure is not full-vs-packed: min_bytes_for_full_part_storage is a Cloud-only no-op in OSS (MergeTreeData::choosePartFormat always returns Full), so the CI --diagnose-random-settings culprit was an RNG-stream confound. The real cause is where the count was read from. The test read ProfileEvents['DirectorySync'] for the DETACH from system.query_log, whose per-query counters are an async snapshot of the query's thread-group counters taken at query finish. The DETACH clones the part inside a nested ProfileEventsScope on the query thread (StorageMergeTree::dropPartition), and under CI parallel load those clone-freeze increments do not reliably reach the thread-group snapshot, so the count collapsed to the covering-empty-part baseline (detach=2 drop=2, exactly the CI signature in 43/43 failing runs). It is DETACH specific: 02361_fsync_profile_events reads the same counter from query_log for an INSERT and is not flaky.

This is not true. Update your build and reference. packed parts are part of the OSS now

@Algunenano

Copy link
Copy Markdown
Member

and no-random-settings/no-random-merge-tree-settings (fixes the part layout so the directory counts are deterministic).

This is wrong too. You should not disable all randomization, as it's clearly detecting problems. Instead find out which cause issues and test them separately by pinning them to their possible values

@groeneai

Copy link
Copy Markdown
Collaborator Author

You are right on both, thanks for the correction.

  1. Packed parts are indeed in OSS master now. My earlier "Cloud-only no-op" was read off a stale branch base (2026-07-15, before the packed-parts merge), where choosePartFormat still always returned Full. On current master choosePartFormat reads min_bytes_for_full_part_storage/min_rows_for_full_part_storage/min_level_for_full_part_storage and returns Packed. clickhouse-test randomizes min_bytes_for_full_part_storage up to 512 MiB (~30% of runs), so the tiny test part becomes a single-blob Packed part with no per-directory fsyncs, and the DirectorySync count collapses to the covering-part baseline. So the --diagnose-random-settings culprit was correct after all, not an RNG confound.

  2. Disabling all randomization is the wrong fix, agreed. I will drop no-random-settings/no-random-merge-tree-settings and instead pin only the setting that actually changes the on-disk layout: min_bytes_for_full_part_storage = 0 (forces Full/directory storage) in each CREATE TABLE ... SETTINGS, leaving everything else randomized. The DirectorySync read stays on part_log (the query_log async-snapshot race was a separate, real issue).

I will update the branch to master, verify Packed vs Full reproduces the collapse and that the pinned test passes under randomization, and report back here.

@groeneai

Copy link
Copy Markdown
Collaborator Author

Done in 09cc68e: dropped no-random-settings / no-random-merge-tree-settings. No setting needed pinning.

Why no pinning is needed: the checks are now relative (a DETACH must fsync at least two more directories than a DROP of the same partition, and a projection one more than a plain detach), so they hold whatever layout randomization produces. I verified this rather than assuming it:

  • With randomization on, 50/50 runs pass, and 8 separate invocations (each a fresh draw of 181 query settings + ~60 MergeTree settings: max_insert_threads 1/2/3, min_bytes_for_wide_part, index_granularity, hashed filenames, fsync_metadata, etc.) all pass.
  • Both directions still hold under randomization: a build with the freeze fsync block disabled fails the same randomized runs with clone_synced=0 / proj_subtree_synced=0, so the test still catches a missing clone fsync.

Kept no-object-storage and no-parallel-replicas, which the test genuinely cannot run under (freeze does no directory fsync on object disks; the part_log read routes to an absent parallel-replicas cluster on a single node), each explained on its tag line.

@groeneai
groeneai force-pushed the fork/groeneai/fix-111382-detach-partition-fsync branch from 09cc68e to c5bf342 Compare July 23, 2026 15:39
@groeneai

Copy link
Copy Markdown
Collaborator Author

Correction to my previous comment: I was wrong that no pinning was needed. min_bytes_for_full_part_storage does matter.

On master, choosePartFormat returns a Packed (single-blob) part when bytes_uncompressed < min_bytes_for_full_part_storage; clickhouse-test randomizes that setting up to 512 MiB (~30% of runs), so the tiny test part becomes a Packed part with no per-directory layout and no directory fsyncs, and the DirectorySync counts collapse. My earlier "relative check holds under any layout" verification ran on the branch's base tree (2026-07-15), which predates the packed-parts merge and so only ever produced Full parts, hiding this. So the --diagnose-random-settings culprit was right after all.

Pushed c5bf342: dropped the no-random-* tags and pinned only min_bytes_for_full_part_storage = 0 (forces Full/directory storage) in each CREATE TABLE, leaving every other setting randomized. Kept no-object-storage and no-parallel-replicas. The part_log DirectorySync read and the relative detach >= drop + 2 assertion are unchanged.

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 589f04f

Every failure below has an owner (a fixing PR). Only CH Inc sync would be exempt; none here.

Check / test Reason Owner / fixing PR
Integration tests (amd_msan, 6/8) / test_storage_rabbitmq::test_refresh_runs_once_while_start_keeps_consuming flaky, 7 PRs / 1 master in 14d, SYSTEM REFRESH on a stopped RabbitMQ table #111480 (ours, open)
Stateless tests (amd_asan_ubsan, distributed plan, parallel) / 02477_single_value_data_string_regression flaky, RC 241 MEMORY_LIMIT_EXCEEDED, not reproducible on rerun (16/16 passed), SingleValueDataString preallocation #110630 / #110632 (external, open)
Upgrade check (amd_release) / New+Changed settings not in settings changes history trunk regression: join_runtime_filter_min_probe_rows (merged #104860) #111671 (ours, open)

The PR-caused 04622_detach_partition_fsync_part_directory flakiness is resolved on this head (276 OK / 0 fail at 589f04f).

Session id: cron:our-pr-ci-monitor:20260723-223000

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger — 589f04f

Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task
whose fixing-PR link will be posted here when it opens. The PR's own new test
04622_detach_partition_fsync_part_directory is now GREEN on this head (the
min_bytes_for_full_part_storage=0 pin + part_log-based rewrite resolved the earlier flakiness).

Check / test Reason Owner / fixing PR
Integration (amd_msan, 6/8) / test_storage_rabbitmq/test_system_stop.py::test_refresh_runs_once_while_start_keeps_consuming flaky (RabbitMQ REFRESH, unrelated to this DETACH-PARTITION fsync PR; 30d spread concentrated on the RabbitMQ PR + scattered singletons) #111480 (ours, open)
Stateless (amd_asan_ubsan, distributed plan, parallel) / 02477_single_value_data_string_regression flaky (chronic; ~14 unrelated PRs + 2 master / 30d) a fix task is created (investigating at full effort, fixing-PR link to follow here)
Upgrade check (amd_release) / New + Changed settings not in settings changes history trunk regression (join_runtime_filter_min_probe_rows placed in 26.7 section vs 26.8; introduced by merged #104860) #111671 (ours, open)

Session id: cron:our-pr-ci-monitor:20260724-040000

groeneai and others added 3 commits July 24, 2026 11:44
ALTER TABLE ... DETACH PARTITION hardlink-clones the part into detached/ via
makeCloneInDetached -> DataPartStorageOnDiskBase::freeze and fsyncs none of it,
then commits an empty covering part that removes the rows from the active set
(which IS fsynced when fsync_part_directory is on) and lazily deletes the
original. The commit that removes the data is durable while the clone that
preserves it is not, so on btrfs a power loss right after the acknowledgement
rolls back the un-synced clone directory entries: detached/ ends up empty, the
rows are gone from the active set, and the original is loaded as covered and
cleaned up. The only copy of the detached data is destroyed. (ext4/xfs happen to
persist the earlier clone through the single journal, an ordering accident.)

DataPartStorageOnDiskBase::freeze now, when fsync_part_directory is set (and on a
local disk, outside an external transaction), fsyncs the clone's part-directory
subtree bottom-up (part dir plus projection subdirs, i.e. the hardlink entries)
and every ancestor directory from the clone's immediate parent (detached/) up to
and including the disk root. fsync(dir) persists the entries inside dir, not dir's
own entry in its parent, and detached/ is created at table init without an fsync
while normal part commits fsync only the child part dir, so the parent chain must
be synced for the clone to survive a first-ever detach. freeze() returns before
the caller commits the covering part, so this synchronous fsync orders the clone
durable before that commit.

Gated on the existing fsync_part_directory MergeTree setting (default false), so
default behavior is unchanged and no SettingsChangesHistory entry is needed. A
no-op on remote/object-storage disks (getDirectorySyncGuard returns nullptr).

This is the DETACH variant of the same unsynced freeze/Backup clone path as
issue ClickHouse#111331 (FREEZE, addressed in ClickHouse#111393); a FREEZE-only fix does not close it.

Closes: ClickHouse#111382

Co-Authored-By: Claude fable-5 <[email protected]>
Regression test for ClickHouse#111382 (DETACH PARTITION must fsync the detached/ clone so a
power loss right after the acknowledgement cannot destroy the only copy of the data).

The directory fsyncs are observed via ProfileEvents['DirectorySync'] on the ALTER's
covering empty part (part_name all_1_1_1) in system.part_log. part_log ProfileEvents
are a synchronous snapshot taken on the query thread, so they capture the clone-freeze
fsyncs deterministically; the per-query system.query_log counters do not, because the
clone freeze runs in a nested profile-events scope whose increments do not reliably
reach the query's thread-group snapshot under CI parallel load (this made an earlier
query_log-based version flaky at detach=2 drop=2, the covering-part-only baseline).
This is DETACH specific: 02361_fsync_profile_events reads the same counter from
query_log for an INSERT and is not flaky.

The test is plain SQL with one table per scenario (02378/03221 part_log style). The
confounders are disabled at the tag level with an explanation each, rather than worked
around at runtime: no-parallel-replicas (the runner otherwise points
cluster_for_parallel_replicas at a cluster absent on the single-node test server),
no-object-storage (freeze fsyncs local directories only), and
no-random-settings/no-random-merge-tree-settings (the part layout must be fixed so the
directory counts are deterministic).

The signal is relative: a DETACH fsyncs the clone leaf and its ancestor chain on top of
the covering part, a DROP fsyncs only the covering part, and fsync-off fsyncs nothing,
so detach >= drop + 2, proj > plain, off = 0. The test also re-attaches every detached
partition and checks all rows are preserved, and asserts all four covering NewPart rows
were logged so a missing row cannot pass silently. Verified both directions: with the
fix every assertion is true (30x randomized plus concurrent detach load, 0 failures);
with the freeze block reverted clone_synced and proj_subtree_synced are false, matching
the CI failure.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…ation for 04622

Drop the no-random-settings / no-random-merge-tree-settings tags and instead pin
only the setting that changes the on-disk layout the test measures. On master,
choosePartFormat returns a Packed (single-blob) part when
bytes_uncompressed < min_bytes_for_full_part_storage; clickhouse-test randomizes
that setting up to 512 MiB, so the tiny test part becomes a Packed part with no
per-directory fsyncs and the DirectorySync counts collapse. Pinning
min_bytes_for_full_part_storage = 0 keeps the parts in Full (directory) storage;
every other setting stays randomized. Keeps no-object-storage and
no-parallel-replicas (the test genuinely cannot run under those).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…rentDatabase() linter

The new test 04622_detach_partition_fsync_part_directory.sql reads directory
fsync counts from system.part_log (already scoped with database =
currentDatabase()). It does not query system.query_log. The literal string
system.query_log appeared only in an explanatory comment contrasting part_log's
synchronous ProfileEvents snapshot with query_log's async per-query counters.

check_style/various_checks.sh greps the whole file (comments included) for
system.query_log/system.query_thread_log and then requires a current_database =
currentDatabase() predicate, so the comment tripped a false positive and failed
Style check. Adding such a predicate would be misleading since the test does not
read query_log and system.part_log has a database column, not current_database.
Reword the comment to drop the literal so the linter no longer matches; behavior
is unchanged (comment-only).
@groeneai
groeneai force-pushed the fork/groeneai/fix-111382-detach-partition-fsync branch from 589f04f to 7508efc Compare July 24, 2026 13:11
DataPartStorageOnDiskPacked::freeze is an independent override of
DataPartStorageOnDiskBase::freeze. The base override was fsynced in the
first commit of this PR, but the packed override hardlinks/copies
data.packed into detached/<part>/ and issued no directory fsync, so a
DETACH of a Packed part (a part satisfying min_bytes_for_full_part_storage
etc.) had the same ClickHouse#111382 data-loss exposure on power loss.

Extract the shared subtree-fsync + ancestor-walk into fsyncFrozenCloneTree()
and call it from both overrides, gated identically
(fsync_part_directory && !external_transaction && !isRemote). Packed clones
store each projection as a <name>.proj subdirectory, so the per-projection
freeze clears fsync_part_directory and the top-level walk fsyncs the whole
clone subtree plus ancestor chain exactly once.

Add a PACKED regression group to 04622 (min_bytes_for_full_part_storage set
high to force Packed storage, guarded by an all_packed assertion) mirroring
the Full group's relative DirectorySync checks.

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

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

Pre-publication review of the packed extension by an independent model (engine: codex; 3 findings; bounded: 1 full pass + 1 fix round + 1 delta recheck).

# Sev Finding Verdict Evidence / action
1 ⚠️ 04622 DirectorySync oracle (>= drop + 2) passes a degraded walk that stops at detached/ AGREE — fixed Tightened both DETACH bounds to >= drop + 3 (leaf + detached/ + table dir), rejecting the stop-at-detached/ degradation. Real margin is far larger (+6 Wide, +12 Packed/Compact); +3 stays robust to path depth. Re-verified both directions with +3.
2 ⚠️ Push further to an EXACT path-derived count DISAGREE The absolute DETACH DirectorySync count is layout-dependent: measured 8 (Wide) vs 16 (Compact) by flipping min_bytes_for_wide_part alone (a CI-randomized setting); it also varies with db engine (store/<prefix>/<uuid> vs data/<db>/<table>) and the disk --path depth. An exact-delta oracle would be flaky under the randomization the test runs with. The relative +3 holds in both layouts (DROP and DETACH scale together), which is why the relative check is correct by design.
3 💡 Changelog category should be Critical Bug Fix (data loss) DISAGREE Category is not chosen unilaterally for a data-loss fix; left as Bug Fix as originally filed. A maintainer can re-categorize if preferred.
4 💡 Durability rationale repeated across comments AGREE — fixed Condensed the added comments: full invariant kept once at the fsyncFrozenCloneTree declaration, inline helper-body and Packed call-site comments reduced to short ordering notes (motivation lives in the commit message).
5 💡 Re-flag: condense pre-existing comments in syncDirectoryTree docstring / IDataPartStorage.h / IMergeTreeDataPart.cpp / test header DISAGREE These are pre-existing from the first commit of this PR (already reviewed), not part of the packed-extension delta; editing them would churn merged-into-PR code without benefit.

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are terminal per finding.

Session id: cron:clickhouse-author-slot-0:20260724-150100

@groeneai

Copy link
Copy Markdown
Collaborator Author

Packed-storage extension (commit 12c0104): pre-PR validation gate.

Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. On a build with the packed fsync reverted (Base fix + test kept), 04622 --no-random fails deterministically: packed group line 0 0 1 1 (clone_synced=0, proj_subtree_synced=0). Packed storage is forced via min_bytes_for_full_part_storage=1000000000 per CREATE TABLE, so it does not depend on randomization.
b Root cause explained? DataPartStorageOnDiskPacked::freeze is an independent override of the Base one. On DETACH of a Packed part (local disk, fsync_part_directory=1) it hardlinks/copies data.packed into detached/<part>/ and returns with no directory fsync. StorageMergeTree then commits a durable covering part and drops the source, so on power loss the unsynced detached/ dentries roll back and the only copy of the detached data is lost — the #111382 bug on the packed path.
c Fix matches root cause? Yes. The same durability step is issued at the end of Packed::freeze, gated identically to Base (fsync_part_directory && !external_transaction && !isRemote): fsync the clone subtree (leaf + <name>.proj subdirs, children-first) plus the ancestor chain to the disk root.
d Test intent preserved / new tests added? Yes. Added a PACKED regression group to 04622 mirroring the Full group, with an all_packed=1 guard proving the parts are genuinely Packed. The Full group is unchanged (except the +3 tightening, applied to both).
e Both directions demonstrated? Yes. Without packed fix: packed line 0 0 1 1 (FAIL), Full line still 1 1 1 1 (isolates the packed override). With fix: packed 1 1 1 1; 50/50 with randomization ON = 50/50 pass.
f Fix is general across code paths? Yes. There are exactly two freeze overrides (Base→used by Full; Packed) — both now fsync. freezeRemote is remote-only (dir fsync is a no-op there) and is never used by DETACH. Shared logic extracted into one fsyncFrozenCloneTree helper both overrides call.
g Fix generalizes across inputs? Yes. Format-level, type-independent. Covers plain parts and parts with projections (packed clone stores each projection as a <name>.proj subdir, fsynced by the children-first walk). Holds for Wide and Compact source parts (verified: DETACH vs DROP delta scales together, +6 Wide / +12 Compact, so the relative >= drop + 3 bound is robust). copy-vs-hardlink handled identically.
h Backward compatible? Yes. No setting default, on-disk/wire/metadata format change. Only adds fsync calls behind the existing fsync_part_directory (default 0). No SettingsChangesHistory impact.
i Invariants and contracts preserved? Yes. The fsync runs after all writes/hardlinks and after commitTransaction()/finalizeWriter(), before freeze returns — same position as Base, ordering the clone durable before the covering-part commit. It only opens/fsyncs directory fds, mutating no part state. Excludes the external-transaction path (its commit fsyncs) and remote disks.

Session id: cron:clickhouse-author-slot-0:20260724-150100

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 12c0104

CI has finished (Finish Workflow green). The PR's own new test 04622_detach_partition_fsync_part_directory is green across all sanitizers (50/50 flaky-check). The two red checks are known trunk issues unrelated to this DETACH PARTITION fsync change; each has an owner:

Check Failure Reason Owner / fixing PR
Stress test (amd_debug) Logical error: Inconsistent KeyCondition behavior (STID 5182-2f27) chronic debug-only monotonicity canary (#90461); compiled out in release, zero correctness impact; fires across master and many unrelated PRs diagnostic #108011 (merged), targeted fix #109023 (open)
Upgrade check (amd_release) Error message in clickhouse-server.log (system.metric_log CREATE metadata exceeds max_query_size) trunk regression, unrelated to this PR; the settings-changes-history sub-tests are green here fixed by #111703 (merged); this head predates the merge, a rebase onto master picks it up

Neither failure is caused by this PR. The C++ durability fix (Full + Packed part storage) is unchanged.

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

Two conflicts, both purely additive; keep-both in each.

src/Storages/MergeTree/IDataPartStorage.h: master added
ClonePartParams::invalidated_columns_to_write next to our fsync_part_directory
field. Both kept; ours stays last so the designated-initializer order at every
call site still matches declaration order.

src/Storages/MergeTree/IMergeTreeDataPart.cpp: the conflict is textual only -
master's side of the hunk in makeCloneInDetached is empty. Our
.fsync_part_directory initializer is preserved unchanged, so the detached/ clone
still honours fsync_part_directory on every DETACH path.

Also checked the two auto-merged freeze() bodies: master's new
writeInvalidatedSystemColumnsFile() call runs before our fsync block in both the
Full and Packed overrides, so the clone (including the newly written
invalidated-columns file) is still made durable before freeze() returns.
@clickhouse-gh

clickhouse-gh Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.30% 86.30% +0.00%
Functions 92.10% 92.10% +0.00%
Branches 78.40% 78.40% +0.00%

Changed lines: Changed C/C++ lines covered: 30/31 (96.77%) · Uncovered code

Full report · Diff report

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 8f6e466

Every failure below has an owner: a fixing PR (ours 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
Stress test (amd_asan_ubsan) / Hung check failed, possible deadlock found trunk-wide chronic hung check, not caused by this diff a fix task is pending (investigating at full effort, fixing-PR link to follow here)

Sole red on this head: 174 check-runs, 155 success, 18 skipped, 1 failure, Finish Workflow
green.

Not caused by this PR, and the evidence is the stack rather than the breadth alone. The
hung_check.log tail shows a query stuck in ANALYSIS:
QueryAnalyzer::resolveTableFunction (QueryAnalyzer.cpp:4895) under
resolveQueryJoinTreeNode / resolveQuery. This PR's diff only adds an fsync of the
DETACH PARTITION clone into detached/ plus one stateless test, so it touches nothing the
analyzer executes.

Breadth over the last 30 days for Hung check failed, possible deadlock found: about
1260 rows across 477 distinct pull requests and 151 true master runs, spanning 13 Stress
flavours (including Stress test (azure, amd_tsan) which is pure master). A per-PR cause is
excluded by that distribution.

I checked whether any fixing PR exists before falling back to a task: the one merged
sub-cause, #111909 ("Fix unkillable hang in random distribution functions", merged
2026-07-27), is already an ancestor of this head, so it cannot be the owner of a failure that
happened with it present. No other open PR fixes this family, and the upstream matcher issue
#107941 is still open. So the owner is the full-effort fix task, which is in progress at full
effort; I will post the fixing-PR link on this thread when it opens.

Session id: cron:our-pr-ci-monitor:20260728-193000

@Algunenano
Algunenano added this pull request to the merge queue Aug 3, 2026
Merged via the queue into ClickHouse:master with commit 42b19a0 Aug 3, 2026
177 of 179 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 3, 2026
arsenmuk added a commit that referenced this pull request Aug 3, 2026
Resolves 3 conflicts from master PR #111426 (fsync DETACH/freeze clone for
power-loss durability) against this branch's unified freeze/freezeRemote refactor:
- IDataPartStorage.h: keep both ClonePartParams::forProjection and fsync_part_directory.
- DataPartStorageOnDisk{Base,Packed}.cpp: keep the unified freeze(..., dst_disk_, ...),
  drop master's now-orphan separate freeze/freezeRemote, and graft fsyncFrozenCloneTree
  (local dst_disk, no external transaction). Packed threads fsync_part_directory=false
  into projection sub-freezes so one top-level fsync covers the whole subtree.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
alexey-milovidov added a commit that referenced this pull request Aug 4, 2026
Two changes on master do not compile for the Windows target:

- The frozen-clone fsync (#111426) passes an `fs::path` to
  `fsyncFrozenCloneTree`, relying on the implicit `path`/`std::string`
  conversion that only exists on POSIX. Route it through
  `pathToGenericString`, like every other disk-path construction site.

- The directory-name length check for async distributed INSERT moved from
  `Cluster.cpp` to `DistributedSink::checkDirectoryNameLengths`, bringing
  back a bare `NAME_MAX`, which Windows does not define. Reintroduce the
  `max_path_component_length` constant this branch had used in `Cluster.cpp`
  (where master removed the check) at the new site.

PR: #112824

Co-Authored-By: Claude Fable 5 <[email protected]>
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Aug 4, 2026
…-freeze-fsync

The sibling DETACH PARTITION durability fix (ClickHouse#111426) merged into master on
2026-08-03 and carried the shared machinery this branch had introduced:
syncDirectoryTree, the subtree+ancestor walk (now the free function
fsyncFrozenCloneTree in DataPartStorageOnDiskBase), the ClonePartParams
fsync_part_directory field, and the calls from both freeze overrides.

Resolution therefore drops this branch's now-duplicated copies in favour of
master's, rather than keeping both:

- IDataPartStorage.h: identical fsync_part_directory member on both sides, only
  the doc comment differed. Took master's comment verbatim.
- DataPartStorageOnDiskBase.{h,cpp}: dropped the private member function
  syncFrozenPartDirectory and its call, keeping master's equivalent free
  function fsyncFrozenCloneTree. Master's call site is strictly better placed:
  it runs after save_metadata_callback, so the freeze metadata the callback
  writes is covered by the same fsync.
- DataPartStorageOnDiskPacked.cpp: dropped the duplicate directory-sync call,
  keeping master's. A naive keep-both would have walked and fsynced the whole
  clone subtree twice per frozen part.

What remains unique to this branch is exactly the ClickHouse#111331 fix and its guard:
the FREEZE call site in freezePartitionsByMatcher now populates
fsync_part_directory from the table's setting (master only wires up the DETACH
call site, so ALTER TABLE ... FREEZE still acknowledged a non-durable
snapshot), the fsync of a rewritten data.packed archive's contents, and the
04621 regression test.
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Aug 18, 2026
…-part-fsync

Resolve the createEmptyPart signature conflict: master added a required
patch_part_index parameter (patch-part support) while this branch added an
optional force_sync. Both are kept, with force_sync last so it stays defaulted
and the other callers (MutateTask, StorageReplicatedMergeTree,
MergeTreeData::6871) are unaffected.

Re-checked that master has not since closed the durability gap: createEmptyPart
still gates the part-directory guard on fsync_part_directory and the content
fsync on fsync_after_insert, both default off, and renameAndCommitEmptyParts
still syncs nothing. The merged DETACH clone fsync (ClickHouse#111426) is itself gated on
fsync_part_directory, so excluding DETACH from force_sync remains correct.
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 pr-bugfix Pull request with bugfix, not backported by default 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.

DETACH PARTITION can destroy the detached data on power loss (btrfs): the detached/ clone is never fsynced while the covering-part commit is

5 participants