Skip to content
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

Add a method to export membership info to v2 store from RaftCluster #16132

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

geetasg
Copy link

@geetasg geetasg commented Jun 23, 2023

Related to #12913
Introducing method to create the snapshot in v2 format using v3 state. This is used by the backup command in this PR. Main snapshot path will be updated in subsequent PRs.
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

@geetasg geetasg mentioned this pull request Jun 23, 2023
21 tasks
@ahrtr
Copy link
Member

ahrtr commented Jul 25, 2023

Overall looks good to me with a minor comment.

@ahrtr
Copy link
Member

ahrtr commented Jul 25, 2023

Please also rebase this PR since it's far behind the head of main.

@geetasg
Copy link
Author

geetasg commented Jul 25, 2023

@ahrtr @serathius thank you for the review. The change to not panic on keyNotFound is primarily driven by the new workflow to export membership to a new store (for snapshot). This store is empty and does not contain the members and will get a keyNotFound if a delete is attempted. The code is now updated to avoid changing mustDeletefromStore method. ptal. Thanks.

@geetasg
Copy link
Author

geetasg commented Jul 25, 2023

cc @ptabor

@@ -167,32 +167,20 @@ func saveSnap(lg *zap.Logger, destSnap, srcSnap string, desired *desiredCluster)
walsnap.Index, walsnap.Term, walsnap.ConfState = snapshot.Metadata.Index, snapshot.Metadata.Term, &desired.confState
newss := snap.New(lg, destSnap)
snapshot.Metadata.ConfState = desired.confState
snapshot.Data = mustTranslateV2store(lg, snapshot.Data, desired)
snapshot.Data = mustTranslateV2store(lg, desired)
Copy link
Member

Choose a reason for hiding this comment

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

Why are we changing etcdutl backup command at all? It's a legacy deprecated way to create snapshot.

Copy link
Author

Choose a reason for hiding this comment

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

This set of PRs is going towards removing the SetStore method of RaftCluster (along with usage of that store). The backup command is a consumer of SetStore so it needs to be updated.

If the backup command needs to be removed from code base, I can open another issue to get that done and inform the user base that the backup command is going away in 3.6. Please let me know if the backup command should be removed. /cc @ahrtr

Copy link
Author

Choose a reason for hiding this comment

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

created:#16321

Copy link
Member

@ahrtr ahrtr Jul 27, 2023

Choose a reason for hiding this comment

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

This set of PRs is going towards removing the SetStore method of RaftCluster (along with usage of that store). The backup command is a consumer of SetStore so it needs to be updated.

Agreed. We need to update the etcdutl backup command, otherwise we have to keep some source code (e.g. SetStore) which are used by etcdutl only.

Please let me know if the backup command should be removed. /cc @ahrtr

Let's discuss it separately. I tend to remove it.

@geetasg geetasg mentioned this pull request Jul 27, 2023
4 tasks
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

LGTM

thx @geetasg

@geetasg
Copy link
Author

geetasg commented Jul 31, 2023

can this PR be merged if there is no additional review feedback? I would like to submit next PR which will consume changes from this one.

@ahrtr
Copy link
Member

ahrtr commented Aug 1, 2023

ping @ptabor @serathius @chaochn47 @fuweid

Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@ahrtr
Copy link
Member

ahrtr commented Aug 2, 2023

cc @mitake and @wenjiaswe to take a look as well.

@ahrtr
Copy link
Member

ahrtr commented Aug 3, 2023

It's unfortunate that there is no active review on a P0 item for 3.6.

If there is no any additional review feedback by the end of this week. I will merge this PR by then given it's a safe change and there are already two approvals.

@wenjiaswe
Copy link
Contributor

It's unfortunate that there is no active review on a P0 item for 3.6.

Looks like there has been active review.

Overall lgtm. @geetasg Thanks for working on this.

I'll defer to @ahrtr and @serathius to decide on merging.

@ahrtr
Copy link
Member

ahrtr commented Aug 4, 2023

thx @wenjiaswe for the review.

@ahrtr ahrtr merged commit 0021204 into etcd-io:main Aug 4, 2023
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants