-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
use stream writer for full snapshot transfer #3442
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.
Couple of comments. Definitely remove the Flatten call. Address those before merging.
Reviewed 21 of 21 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @gitlw and @martinmr)
worker/snapshot.go, line 61 at r1 (raw file):
var writer badgerWriter if snap.SinceTs == 0 { //Before we write anything, we should drop all the data stored in ps.
Add space between // and B.
worker/snapshot.go, line 103 at r1 (raw file):
glog.V(1).Infof("Flushed all writes to Badger. Flattening it now.") if err := pstore.Flatten(1); err != nil {
Can remove this flatten stuff. Unnecessary.
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.
Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gitlw and @martinmr)
worker/snapshot.go, line 62 at r2 (raw file):
if snap.SinceTs == 0 { // Before we write anything, we should drop all the data stored in ps. if err := pstore.DropAll(); err != nil {
Remove.
Tested through the snapshot_test.go
This change is