-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple loose indexes #36
Conversation
98786dc
to
a6b5981
Compare
I'm going to pull out the fs2 / locks changes into a separate PR. Other than that, this is ready to go. |
72b0116
to
6d38cf6
Compare
OK, I'm now done with this. Left atomic writes alone here, got rid of the fs2 dependency, which can be thought about separately as part of #40. |
6d38cf6
to
4b44044
Compare
Assuming it's green, I'm done fiddling here. The last action broke the tests again. |
cbdb0fd
to
eb17bf1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! There will be no slowdown now when loose snapshots pile up.
A couple of comments, some might be non-trivial to resolve, sorry 🤔.
eb17bf1
to
f42eb13
Compare
Signed-off-by: Peter Waller <peter.waller@arm.com>
Signed-off-by: Peter Waller <peter.waller@arm.com>
f42eb13
to
54e439f
Compare
Signed-off-by: Peter Waller <peter.waller@arm.com>
Avoid crashing with divide by zero on an empty pack. An empty pack isn't very useful, except for testing. Signed-off-by: Peter Waller <peter.waller@arm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, everything's fixed and we're now sorting by mtime
, which preserves the order of the snapshots, thanks!
Typo in check.sh
causes the tests to fail.
c435aed
to
4c224ae
Compare
If no snapshots are specified, pack them in the order they were created. Signed-off-by: Peter Waller <peter.waller@arm.com>
4c224ae
to
8278cfd
Compare
Frustratingly |
Depends on #29, so beware full diff contains that diff.This builds on #29 (remove repository index).
PackId::Loose
. I intend to go a bit further here and get rid of PackId as an enum but that can be done later in a no-functional-changes PR.--pack|-P
from the command line interface, simplifying the user interface a bit.repo.find_snapshot(maybe_canonical_snapshot) -> SnapshotId
. This API returns an error if the given string does not uniquely identify a snapshot within a single index.pack:snapshot
, or justsnapshot
, which feeds through this API.:
as apackid:snapshot_name
separator enables/
to be used for namespacing packs by using directories on the filesystem, and for/
to appear in snapshot in the future too, if we wanted.packs/loose/<snapshot_name>.idx
. So a loose snapshot is uniquely identified withloose/snapshot_name:snapshot_name
, for the time being, ifsnapshot_name
exists in other packs, or just with the stringsnapshot_name
otherwise.There is one slightly confusing nomenclature issue with this PR, in that we refer to loose packs as packs, when they aren't yet packed. So the loose snapshots live in a 'loose/name.pack.idx'.
Resolves #15.