Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/borg/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,17 +694,6 @@ def memorize_file(self, hashed_path, path_hash, st, chunks):
)


def try_upgrade_to_b14(repository):
# TODO: remove this before 2.0.0 release
# we just delete any present chunk index cache here, it is invalid due to the
# refcount -> flags change we did and due to the different CHUNKINDEX_HASH_SEED.
for name in "chunks_hash", "chunks":
try:
repository.store_delete(f"cache/{name}")
except (Repository.ObjectNotFound, StoreObjectNotFound):
pass # likely already upgraded


def list_chunkindex_hashes(repository):
hashes = []
for info in repository.store_list("cache"):
Expand Down Expand Up @@ -807,7 +796,6 @@ def read_chunkindex_from_repo_cache(repository, hash):


def build_chunkindex_from_repo(repository, *, disable_caches=False, cache_immediately=False):
try_upgrade_to_b14(repository)
# first, try to build a fresh, mostly complete chunk index from centrally cached chunk indexes:
if not disable_caches:
hashes = list_chunkindex_hashes(repository)
Expand Down