mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-26 01:37:20 +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)
|
||||
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
|
||||
# set up the key without depending on a manifest obj
|
||||
ids = repository.list(limit=1, marker=None)
|
||||
|
@ -1940,7 +1940,7 @@ def do_debug_dump_repo_objs(self, args, repository):
|
|||
marker = None
|
||||
i = 0
|
||||
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:
|
||||
break
|
||||
marker = result[-1]
|
||||
|
|
Loading…
Reference in a new issue