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:
1 parent
82c64f9908
commit
6dcb7b676f
16 files changed
+117
-448
No files matched your search
@@ -433,7 +433,6 @@ func (e Engine) Sync(ctx context.Context, c Config, statePath string, final bool
|
||||
func sameMigrationIdentity(a, b Config) bool {
|
||||
a.Workers, b.Workers = 0, 0
|
||||
a.BandwidthKiB, b.BandwidthKiB = 0, 0
|
||||
a.FullScan, b.FullScan = false, false
|
||||
// "" and "native" select the same backend.
|
||||
a.Backend, b.Backend = "", ""
|
||||
return reflect.DeepEqual(a, b)
|
||||
@@ -484,10 +483,7 @@ func (e Engine) transfer(ctx context.Context, src, dst ceph, target, statePath s
|
||||
aware, isNative := e.Transport.(RoundTransport)
|
||||
existed := slices.Contains(targetNames, snap.Name)
|
||||
if isNative {
|
||||
// Only intermediate round snapshots may skip unchanged subtrees. They are
|
||||
// deleted later, and finalize scans everything again.
|
||||
round := Round{SourcePath: from, TargetPath: target, Name: snap.Name, StatePath: statePath, BaseName: s.LiveSnapshot,
|
||||
SkipUnchanged: snap.Owned && !snap.Final && !s.Config.FullScan}
|
||||
round := Round{SourcePath: from, TargetPath: target, Name: snap.Name, StatePath: statePath, BaseName: s.LiveSnapshot}
|
||||
if s.LiveSnapshot != "" {
|
||||
round.BaseSourcePath, err = src.snapshotPath(ctx, s.LiveSnapshot)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user