-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
wal: add Verify function to perform corruption check on wal contents #10516
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10516 +/- ##
=========================================
- Coverage 71.88% 71.59% -0.3%
=========================================
Files 393 393
Lines 36521 36572 +51
=========================================
- Hits 26254 26183 -71
- Misses 8449 8556 +107
- Partials 1818 1833 +15
Continue to review full report at Codecov.
|
cc @wenjiaswe |
ba5ed69
to
dc8552d
Compare
eb554ce
to
593172e
Compare
@shreyas-s-rao awesome. can you write a small test for verify func? |
@xiang90 I have added a test for |
@shreyas-s-rao a few nits. looks good to me after fixing them. |
Signed-off-by: Shreyas Rao <[email protected]>
Signed-off-by: Shreyas Rao <[email protected]>
5f36a97
to
bb3eb8f
Compare
lgtm |
@xiang90 Thanks for the review! Could you please add this PR to your next release |
@shreyas-s-rao we do not usually backport new features. but i will let @gyuho and @jpbetz make the decision. |
@xiang90 Ah ok. Thanks for the info. |
This adds new functionality, so is clearly more than a bug fix, but does not include an API change, so it's backward compatible. Given that it protects users against corruption, I'm slightly in favor of this being backported. But it's @gyuho's call as the patch manager of 3.3. I'll support whatever he decides. |
tests failures are unrelated. |
@xiang90 @jpbetz @gyuho I would like to know if there has been any decision taken on the release for this PR? I am only asking from the perspective of my project which is currently in need of the |
@shreyas-s-rao Looks like the last 3.3 patch release was on 2019-02-07. They're typically released every month or two, depending on how many fixes have been accumulated. There are very few backports to 3.3.13 so far, so I'd not rush to release the next patch version yet, but probably some time this month? @gyuho Any thoughts? |
@gyuho any thoughts on the above request? This fix is important for us, so knowing the release date of next patch version will help us plan better internally. Thanks! |
We are close to end of the month, is there any release planned? Any updates on this will be highly appreciated. Thanks! |
can you help backport? |
Sure @gyuho . What is the process for that? |
@shreyas-s-rao You can check out the upstream release branch (e.g. |
Signed-off-by: Shreyas Rao [email protected]
To allow verification of the WAL contents with minimal memory footprint. Added a
Verify
function to thewal
package that performs a corruption check on the WAL contents and reports any errors. This serves to be a streamlined version of theReadAll
method on theWAL
struct, as it allows for a quick validation of the WAL contents before starting etcd from an existing data directory without the overhead of returning the entire WAL data in-memory to the caller. Also refactored theopenAtIndex
function to allow theVerify
function to reuse code for creating decoder.Fixes #10497