implementation for archiving a pack file#138
Open
zhubonan wants to merge 13 commits into
Open
Conversation
Archive packs needs special handling. 1. They should not be selected for writing 2. They can reside on different locations
This allow an archived pack to be imported into other containers, without the need of the SQLite database file.
Sometimes it is a string, sometimes it can be an int. sqlite does not seem to care? But matching inside python differentiate the two.
This allows archive files to exist outside of the container folder.
Allow archive locations to be set/updated, alow added CLI
1 task
Codecov Report
@@ Coverage Diff @@
## develop #138 +/- ##
===========================================
- Coverage 99.52% 97.07% -2.45%
===========================================
Files 8 8
Lines 1676 1881 +205
===========================================
+ Hits 1668 1826 +158
- Misses 8 55 +47
Continue to review full report at Codecov.
|
Collaborator
Author
|
Hi @chrisjsewell @giovannipizzi, could you please take a look of this? Some prblems still to be solved:
|
Alow CompressMode.YES and CompressMode.NO to be used when repacking. Previously, there was no way to change compression once an object is stored in a packed file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #133
Archived pack files are essentially ZIP archives. Reading from these files are also supported from offset/length as stored in the sqlite database. Because archived packs will never be used for reading, they can be stored at different file systems and networked locations. The use of ZIP archives also allows recovering data in case of the sqlite database being damaged.
The main difference between an archived pack and a normal pack is that:
Creating an archive is a slow process, and should be carried out while the container is not activet (e.g. similar to repack). However, I think it is should still be possible to carry out as long as the pack file being archived not being written into at the same time.
A new table is needed in the sqlite database to store the status of the pack file, with two extra columns:
stateandlocation. The former would be changed toArchivedif the pack is archived. The latter stores any explicit location of the archived pack file.A cli interface is provided to list archive files and update their locations.