Skip to content

Conversation

@abeyad
Copy link

@abeyad abeyad commented May 10, 2016

This commit adds a UUID for each snapshot, in addition to the already
existing repository and snapshot name. The addition of UUIDs will enable
more robust handling of the deletion of previous snapshots and lingering
files from partially failed delete operations, on top of being able to
uniquely track each snapshot.

Relates #18156

@abeyad
Copy link
Author

abeyad commented May 10, 2016

@s1monw @ywelsch your feedback would be appreciated.

this.cause = cause;
this.name = name;
this.repository = repository;
public SnapshotRequest(String cause, Snapshot snapshot) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we are changing this constructor, can you put Snapshot as first argument?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have seen this comparison in several places. Maybe, it makes sense to move inside Snapshot and have something like boolean hasName(String repository, String name) method where it will take place? Not sure if hasName is a good name for this method though.

@abeyad
Copy link
Author

abeyad commented May 27, 2016

@ywelsch @imotov The latest commit addressing code review comments is here: a17039c

Also, @imotov has requested I create an infrastructure for testing repositories with old snapshots interoperating with new snapshots. For now, the only thing to test is the blob names with respect to the changes, but it will make it easier to test changes down the road with generational index files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only loads the snapshots from disk.
Please fix and add a test.

@abeyad
Copy link
Author

abeyad commented May 28, 2016

@ywelsch @imotov

This commit addresses the TransportGetSnapshotsAction issue with tests: ff262ae
This commit adds testing for repository interoperability with previous versions: 1bbd2a5

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this comment has very limited shelf life :) It might make sense to omit the concrete versions since we are going to use this test after 5.0. Basically, say something about testing upgrading repository from the previous version to the new version. It might also make sense to rename the test to include word Upgraded since mixed is somewhat ambiguous here. Maybe RepositoryUpgradabilityIT?

@abeyad
Copy link
Author

abeyad commented May 31, 2016

@imotov 9969ec3 fixes the issues with the upgradability test

@imotov
Copy link
Contributor

imotov commented Jun 1, 2016

LGTM

@abeyad
Copy link
Author

abeyad commented Jun 1, 2016

Thank you for the review and valuable comments, @imotov!

@abeyad abeyad force-pushed the snapshot-uuid branch 2 times, most recently from 16f6d2e to 23cb567 Compare June 2, 2016 01:44
This commit adds a UUID for each snapshot, in addition to the already
existing repository and snapshot name. The addition of UUIDs will enable
more robust handling of the deletion of previous snapshots and lingering
files from partially failed delete operations, on top of being able to
uniquely track each snapshot.

Relates elastic#18156
@ywelsch
Copy link
Contributor

ywelsch commented Jun 2, 2016

LGTM 2! Thanks for all the work here @abeyad. I think we've both learned quite a lot about some of the finer details of snap/restore.

@abeyad
Copy link
Author

abeyad commented Jun 2, 2016

@ywelsch thank you for your patience and great feedback! Indeed we have learned a lot more on snapshot/resotre, which means more work ahead :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement v5.0.0-alpha4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants