fix!: remove skipping of unchanged subtrees

Intermediate rounds skipped a directory when its inode version and its
ceph.dir.rctime matched the previous round. In the 10,000-file lab test
a round snapshot taken seconds after changes skipped tree/ with about
250 changed files in its subdirectories: the inode version of tree/
changes only with its own entries, and Ceph had not yet propagated the
rctime of the grandchildren. The target snapshot of that round was
incomplete, and its verification skipped the same subtrees; only
finalize closed the gap.

Every round now scans all metadata again. Base index entries that the
old version marked carried are never trusted, so such files are copied
in full in the next round.

The smallfiles verification now checks only snapshots that sync did not
remove.

BREAKING CHANGE: the configuration field "full_scan" and the transfer
statistic "skipped_subtrees" are removed; a configuration with
"full_scan" is rejected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-12-03 22:17:47 +01:00
1 parent 82c64f9908
commit 6dcb7b676f
16 files changed
+117 -448

No files matched your search

+1 -4
View File
@@ -50,13 +50,11 @@ type Transport interface {
// Round describes one snapshot transfer handed to a RoundTransport.
// BaseName and BaseSourcePath name the last completed snapshot, if any,
// which allows an incremental transfer. SkipUnchanged permits skipping
// subtrees whose recursive ctime did not change since the base.
// which allows an incremental transfer.
type Round struct {
SourcePath, TargetPath string
BaseName, BaseSourcePath string
Name, StatePath string
SkipUnchanged bool
}
// RoundTransport is a Transport that keeps state across a snapshot round,
@@ -78,7 +76,6 @@ type TransferStats struct {
BytesVerified int64 `json:"bytes_verified"`
BlockDiffFiles int64 `json:"blockdiff_files"`
SnapDiffEntries int64 `json:"snapdiff_entries"`
SkippedSubtrees int64 `json:"skipped_subtrees,omitempty"`
// Seconds is the duration of the round from its start to the commit,
// including verification and snapshot creation.
Seconds float64 `json:"seconds"`