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

Sent restore proposals to all groups asyncronouosly. #5467

Merged
merged 4 commits into from
May 22, 2020

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented May 18, 2020

Previously, the requests were being sent one after the other.


This change is Reviewable

Docs Preview: Dgraph Preview

Previously, the requests were being sent one after the other.
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: Got some comments.

Reviewed 1 of 1 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @martinmr and @vvbalaji-dgraph)


worker/online_restore_ee.go, line 74 at r1 (raw file):

		go func() {
			defer wg.Done()
			proposeRestoreOrSend(ctx, reqCopy, errCh)

errCh <- proposeRestoreOrSend(...)


worker/online_restore_ee.go, line 80 at r1 (raw file):

	close(errCh)

	for err := range errCh {

for range currentGroups {

if err := <-errCh; err != nil { return }
}

It's safe to return because pushing to errCh won't block.


worker/online_restore_ee.go, line 92 at r1 (raw file):

	if groups().ServesGroup(req.GetGroupId()) {
		_, err := (&grpcWorker{}).Restore(ctx, req)
		errCh <- err

no need.

Copy link
Contributor Author

@martinmr martinmr left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 3 unresolved discussions (waiting on @manishrjain and @vvbalaji-dgraph)


worker/online_restore_ee.go, line 74 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

errCh <- proposeRestoreOrSend(...)

Done.


worker/online_restore_ee.go, line 80 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

for range currentGroups {

if err := <-errCh; err != nil { return }
}

It's safe to return because pushing to errCh won't block.

Done.


worker/online_restore_ee.go, line 92 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

no need.

Done.

@martinmr martinmr merged commit 12f2ce7 into master May 22, 2020
@martinmr martinmr deleted the martinmr/async-restore branch May 22, 2020 19:41
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 18, 2020
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