Skip to content

Commit 9533b50

Browse files
Merge pull request #9372 from mr-raj12/remove-try-upgrade-to-b14
cache: remove try_upgrade_to_b14() legacy migration, fixes #9371
2 parents 3f6282c + cace06f commit 9533b50

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/borg/cache.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -694,17 +694,6 @@ def memorize_file(self, hashed_path, path_hash, st, chunks):
694694
)
695695

696696

697-
def try_upgrade_to_b14(repository):
698-
# TODO: remove this before 2.0.0 release
699-
# we just delete any present chunk index cache here, it is invalid due to the
700-
# refcount -> flags change we did and due to the different CHUNKINDEX_HASH_SEED.
701-
for name in "chunks_hash", "chunks":
702-
try:
703-
repository.store_delete(f"cache/{name}")
704-
except (Repository.ObjectNotFound, StoreObjectNotFound):
705-
pass # likely already upgraded
706-
707-
708697
def list_chunkindex_hashes(repository):
709698
hashes = []
710699
for info in repository.store_list("cache"):
@@ -807,7 +796,6 @@ def read_chunkindex_from_repo_cache(repository, hash):
807796

808797

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

0 commit comments

Comments
 (0)