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
@@ -75,7 +75,7 @@ def populate(root):
|
||||
os.setxattr(root + "/d", "ceph.quota.max_bytes", b"33554432")
|
||||
os.setxattr(root + "/d", "ceph.quota.max_files", b"1000")
|
||||
os.setxattr(root, "ceph.quota.max_bytes", b"268435456")
|
||||
# A subtree no round changes; sync rounds skip it by its rctime.
|
||||
# A subtree no round changes.
|
||||
os.makedirs(root + "/static/deep/deeper")
|
||||
pathlib.Path(root + "/static/deep/deeper/file").write_bytes(b"static" * 1000)
|
||||
os.link(root + "/static/deep/deeper/file", root + "/static/alias")
|
||||
@@ -277,10 +277,6 @@ elif action in ("verify", "final"):
|
||||
assert compare_times(a, b, atime=True) > 10
|
||||
assert snapshot("source", "metadata", "ls", "cephfs", name, snap["name"]) == snapshot(
|
||||
"target", "metadata", "ls", "cephfs", name, snap["name"])
|
||||
owned = [x for x in s["snapshots"] if x["owned"]]
|
||||
# Intermediate rounds skip the untouched subtree; finalize never skips.
|
||||
assert all(x["transfer"].get("skipped_subtrees", 0) >= 1 for x in owned if not x.get("final")), owned
|
||||
assert all(x["transfer"].get("skipped_subtrees", 0) == 0 for x in owned if x.get("final")), owned
|
||||
h2 = next(x for x in s["snapshots"] if x["name"] == "history-2")["transfer"]
|
||||
assert h2["mode"] == "snapdiff" and h2["blockdiff_files"] > 0, h2
|
||||
assert h2["bytes_copied"] < 64 << 20, h2
|
||||
|
||||
Reference in new issue
Block a user