-
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
*: make sure snapshot save downloads SHA256 checksum #11896
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11896 +/- ##
==========================================
+ Coverage 65.65% 66.23% +0.57%
==========================================
Files 403 403
Lines 37145 37160 +15
==========================================
+ Hits 24388 24613 +225
+ Misses 11249 11034 -215
- Partials 1508 1513 +5
Continue to review full report at Codecov.
|
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.
I appreciate the great code comments!
br += int64(n) | ||
sent += int64(n) | ||
|
||
// if total is x * snapshotSendBufferSize. it is possible that |
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.
appreciate the comment.
clientv3/maintenance.go
Outdated
// No, server sends EOF with an empty response | ||
// after it sends SHA digest at the end | ||
// TODO: investigate why this had happened... | ||
if resp == nil { |
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.
If we think the code should be unreachable, is it possible to log a warning here?
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.
it should be unreachable because if the server sends EOF it will get consumed by pw.CloseWithError(err) which treats EOF as a non-issue i.e. pw.CloseWithError(io.EOF) is basically the same as pw.Close()
c8e7d9c
to
eac0b25
Compare
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
I've seen some cases SHA blobs are missing (still investigating). Adding a check to make sure snapshot save always downloads hash digests for integrity checks. Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
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.
@gyuho thanks, lgtm and great job with all the doc/log messages!
ref. #11896 Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
ref. #11896 Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
ref. #11896 Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
ref. #11896 Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
ref. #11896 Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
ref. #11896 Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
ref. #11896 Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
* Snapshot hash is sent after the first occurence of `r.remaining_bytes() == 0`. See etcd-io/etcd#11896 for more information. * If the snapshot operation is performed as shown in the example previously, restarting the etcd on the stored data from this won't succeed unless etcd is started with `--skip-hash-check=true`. This isn't necessary anymore since the final `msg.message().await` fetches the snapshot hash information.
* Snapshot hash is sent after the first occurance of `r.remaining_bytes() == 0`. See etcd-io/etcd#11896 for more information. * If the snapshot operation is performed as shown in the example previously, restarting the etcd on the stored data from this won't succeed unless etcd is started with `--skip-hash-check=true`. This isn't necessary anymore since the final `msg.message().await` fetches the snapshot hash information.
* Snapshot hash is sent after the first occurance of `r.remaining_bytes() == 0`. See etcd-io/etcd#11896 for more information. * If the snapshot operation is performed as shown in the example previously, restarting the etcd on the stored data from this won't succeed unless etcd is started with `--skip-hash-check=true`. This isn't necessary anymore since the final `msg.message().await` fetches the snapshot hash information.
…n. (#83) * Snapshot hash is sent after the first occurance of `r.remaining_bytes() == 0`. See etcd-io/etcd#11896 for more information. * If the snapshot operation is performed as shown in the example previously, restarting the etcd on the stored data from this won't succeed unless etcd is started with `--skip-hash-check=true`. This isn't necessary anymore since the final `msg.message().await` fetches the snapshot hash information.
We've seen some cases where hash was missing from snapshots (still investigating).
This makes sure
clientv3/snapshot
downloads checksum from the server.