-
Notifications
You must be signed in to change notification settings - Fork 100
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
Double check latest revision by starting an embedded etcd if revision check based on data dir fails during data validation #275
Conversation
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.
Thanks a lot for the PR @ishan16696! Just some small suggestions.
Also, do you plan to include the test (copying old data directory and restoring it)?
BTW Could you please sign the CLA?
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.
Thanks for the changes! One small change again :-)
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.
One small change again 😉
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.
Thanks @ishan16696 for making the changes. Looks like the change in copyFile
function is breaking one of the other test cases. Please look into this and fix it. You can run unit tests locally before pushing changes, by running make verify
.
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.
LGTM pending unit test results.
…es abruptly, this can lead to unnecessary data restoration.
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.
/lgtm
What this PR does / why we need it:
WALs file can have data revisions which are ahead of data revisions present in DB file, if etcd terminates abnormally and fails to flush the changes from WALs to Bolt DB ,this lead to unnecessary data restoration.
This PR eliminates this unnecessary data restoration. Starting the embedded etcd on data dir, ping the embedded etcd for 60s to get the latest revision from etcd, after that compare this latest revision and latest revision of back-up data.
Which issue(s) this PR fixes:
Fixes #260
Special notes for your reviewer:
Release note: