-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
clientv3: add db integrity check in snapshot status #10109
clientv3: add db integrity check in snapshot status #10109
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10109 +/- ##
==========================================
+ Coverage 71.52% 71.8% +0.27%
==========================================
Files 390 390
Lines 36264 36269 +5
==========================================
+ Hits 25939 26044 +105
+ Misses 8513 8425 -88
+ Partials 1812 1800 -12
Continue to review full report at Codecov.
|
lgtm |
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 after error message updates as @xiang90 suggested.
a8fa39e
to
d6984c0
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.
Looks great, just one minor wording suggestion.
clientv3/snapshot/v3_snapshot.go
Outdated
count++ | ||
} | ||
if count > 0 { | ||
return fmt.Errorf("database corrupted! %d errors found.\n"+strings.Join(db_err_strings, "\n"), count) |
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.
Maybe "snapshot file integrity check failed." ?
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.
Sounds good. Thanks!
Add snapshot file integrity check in snapshot status. If the file is corrupted, return with error message.
d6984c0
to
422f867
Compare
@jingyih thanks! |
Add snapshot file integrity verification in snapshot status.
Add snapshot file integrity verification when querying snapshot status.
…elease-3.3 etcdctl: cherry pick of #10109 to release-3.3
Add snapshot file integrity verification when querying snapshot status.
…elease-3.2 etcdctl: cherry pick of #10109 to release-3.2
…elease-3.1 etcdctl: cherry pick of #10109 to release-3.1
CHANGELOG-3.3: update from #10109
CHANGELOG-3.4: update from #10109
CHANGELOG-3.2: update from #10109
CHANGELOG-3.1: update from #10109
Add snapshot file integrity verification in snapshot status. If the file is corrupted, user should be notified.
fix: #10108
Example output: