From 7b52fd77271a093fdbe9027c65c3a9b6da0156bf Mon Sep 17 00:00:00 2001 From: Oliver Schmidt <104593071+osnyx@users.noreply.github.com> Date: Thu, 19 Mar 2026 12:10:29 +0100 Subject: [PATCH] Revert "Pl 134246 make whole object diff configurable" --- .../20251209_162100_whole_object_configurable.rst | 3 --- src/backy/sources/ceph/rbd.py | 6 +----- src/backy/sources/ceph/source.py | 10 +++------- 3 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 changelog.d/20251209_162100_whole_object_configurable.rst diff --git a/changelog.d/20251209_162100_whole_object_configurable.rst b/changelog.d/20251209_162100_whole_object_configurable.rst deleted file mode 100644 index 8f42083..0000000 --- a/changelog.d/20251209_162100_whole_object_configurable.rst +++ /dev/null @@ -1,3 +0,0 @@ -.. A new scriv changelog fragment. - -- Make whole object diff configurable (PL-134246) diff --git a/src/backy/sources/ceph/rbd.py b/src/backy/sources/ceph/rbd.py index 036a4dd..7bd74a0 100644 --- a/src/backy/sources/ceph/rbd.py +++ b/src/backy/sources/ceph/rbd.py @@ -13,11 +13,9 @@ class RBDClient(object): log: BoundLogger - use_whole_object_diff: bool - def __init__(self, log: BoundLogger, use_whole_object_diff=False): + def __init__(self, log: BoundLogger): self.log = log.bind(subsystem="rbd") - self.use_whole_object_diff = False def _ceph_cli(self, cmdline, encoding="utf-8") -> str: # This wrapper function for the `rbd` command is only used for @@ -69,8 +67,6 @@ def _rbd_stream(self, cmd: list[str]) -> Iterator[IO[bytes]]: @functools.cached_property def _supports_whole_object(self): - if not self.use_whole_object_diff: - return False return "--whole-object" in self._rbd(["help", "export-diff"]) def exists(self, snapspec): diff --git a/src/backy/sources/ceph/source.py b/src/backy/sources/ceph/source.py index ccc8056..cd4c3d1 100644 --- a/src/backy/sources/ceph/source.py +++ b/src/backy/sources/ceph/source.py @@ -28,9 +28,7 @@ def __init__(self, config: dict, log: BoundLogger): self.image = config["image"] self.always_full = config.get("full-always", False) self.log = log.bind(subsystem="ceph") - self.rbd = RBDClient( - self.log, config.get("use-full-object-diff", False) - ) + self.rbd = RBDClient(self.log) def ready(self) -> bool: """Check whether the source can be backed up. @@ -148,10 +146,8 @@ def verify(self, target) -> bool: return backy.utils.files_are_roughly_equal( source, target, - report=( - lambda s, t, o: self.revision.backup.quarantine.add_report( - QuarantineReport(s, t, o) - ) + report=lambda s, t, o: self.revision.backup.quarantine.add_report( + QuarantineReport(s, t, o) ), )