mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-27 10:18:12 +00:00
use repository.scan() for dump-repo-objs to get on-disk order
it is also more efficient, avoids random access.
This commit is contained in:
parent
c2ed0d9ee0
commit
2b7d65b024
1 changed files with 2 additions and 2 deletions
|
@ -1930,7 +1930,7 @@ def do_debug_dump_manifest(self, args, repository, manifest, key):
|
||||||
|
|
||||||
@with_repository(manifest=False)
|
@with_repository(manifest=False)
|
||||||
def do_debug_dump_repo_objs(self, args, repository):
|
def do_debug_dump_repo_objs(self, args, repository):
|
||||||
"""dump (decrypted, decompressed) repo objects"""
|
"""dump (decrypted, decompressed) repo objects, repo index MUST be current/correct"""
|
||||||
from .crypto.key import key_factory
|
from .crypto.key import key_factory
|
||||||
# set up the key without depending on a manifest obj
|
# set up the key without depending on a manifest obj
|
||||||
ids = repository.list(limit=1, marker=None)
|
ids = repository.list(limit=1, marker=None)
|
||||||
|
@ -1940,7 +1940,7 @@ def do_debug_dump_repo_objs(self, args, repository):
|
||||||
marker = None
|
marker = None
|
||||||
i = 0
|
i = 0
|
||||||
while True:
|
while True:
|
||||||
result = repository.list(limit=LIST_SCAN_LIMIT, marker=marker)
|
result = repository.scan(limit=LIST_SCAN_LIMIT, marker=marker) # must use on-disk order scanning here
|
||||||
if not result:
|
if not result:
|
||||||
break
|
break
|
||||||
marker = result[-1]
|
marker = result[-1]
|
||||||
|
|
Loading…
Reference in a new issue