Support migration to repository format with compression#3704
Support migration to repository format with compression#3704fd0 merged 15 commits intorestic:masterfrom
Conversation
be2f5e0 to
6159a1b
Compare
|
I've rebased this branch onto #3666 |
6159a1b to
a2210f6
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Please keep the comments and discussions in this PR related to the code (otherwise we'll get buried by comments!). Please ask questions in the forum. Thanks a lot! |
312ba79 to
eccc7e3
Compare
|
I've replaced the compress_repo_v2 migration with a new parameter for |
|
I wonder whether the upgrade_repo_v2 migration should first try to just overwrite the |
|
Oh, good idea! I didn't know that we allow overwriting files in the backends. I thought we open files (in sftp and local) with |
|
@fd0 And they should: I suspect what @MichaelEischer means is "create at temporary path" + "move into place". |
|
Ah! It was dropped when we switched to temporary files. Hm. Maybe we should look into restoring that behavior with local and sftp backends (in a separate issue though). |
Since the changes to atomically create files in local/sftp, these backends already creates a temporary file and then move it into place. The Azure/GS/S3/Swift backends also support atomic replacements for files.
For what purpose? The normal files which use a hash as filename don't care because the file content will be identical. And for the config file it shouldn't matter either. Either you're able to overwrite/delete that file or not. |
|
Ah, I just noticed that sftp doesn't overwrite existing files. It's using And for the cloud backends we cannot prevent atomic overwrites either, we could check whether a file exists first, but that costs an additional API call. (and might lead to consistency problems on S3-like backends) |
|
The repo format migration now sort of runs |
Tree packs are cached locally at clients and thus benefit a lot from being compressed. Ensure this be having prune always repack pack files containing uncompressed trees.
This is currently only used by upgrade_repo_v2.
977077d to
c1bbbcd
Compare
|
The migrate command now directly runs check for |
What does this PR change? What problem does it solve?
This is the second part of #3666. It adds support to migrate existing repositories to the latest repository format version.
Left-over todos from #3666:
Was the change previously discussed in an issue or on the forum?
Fixes #3666.
Checklist
changelog/unreleased/that describes the changes for our users (see template).gofmton the code in all commits.