Skip to content
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

Merged
merged 8 commits into from
May 21, 2019
Merged

Conversation

gitlw
Copy link

@gitlw gitlw commented May 18, 2019

Tested through the snapshot_test.go


This change is Reviewable

@gitlw gitlw requested review from manishrjain, martinmr and a team as code owners May 18, 2019 00:24
Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: 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.

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

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.

@gitlw gitlw merged commit 9d28844 into master May 21, 2019
@gitlw gitlw deleted the gitlw/use-swriter branch May 21, 2019 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants