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

Improve reporting of aborts and retries during live load. #3313

Merged
merged 3 commits into from
Apr 25, 2019

Conversation

codexnull
Copy link
Contributor

@codexnull codexnull commented Apr 23, 2019

Summary of changes:

  • Fix detection of aborts.
  • Report abort and eventual success.

This change is Reviewable

@codexnull codexnull requested review from manishrjain and a team as code owners April 23, 2019 22:15
@codexnull codexnull requested review from a team and removed request for a team April 23, 2019 22:17
Copy link
Contributor

@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, 2 unresolved discussions (waiting on @codexnull and @manishrjain)


dgraph/cmd/live/batch.go, line 82 at r1 (raw file):

	start time.Time

	nreqs    uint64

not sure what nreqs is just by looking at it. does it stand for "number of requests"? If so, maybe numReqs is better.


dgraph/cmd/live/batch.go, line 130 at r1 (raw file):

// the node certificate is created the name much match the request host name. e.g., localhost not
// 127.0.0.1.
func handleError(err error, nreq uint64, isRetry bool) {

nit: I think reqNum is a slightly better name.

Same for all the other instances of this variable name.

Copy link
Contributor Author

@codexnull codexnull 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, 1 unresolved discussion (waiting on @manishrjain and @martinmr)


dgraph/cmd/live/batch.go, line 82 at r1 (raw file):

Previously, martinmr (Martin Martinez Rivera) wrote…

not sure what nreqs is just by looking at it. does it stand for "number of requests"? If so, maybe numReqs is better.

Done.

@manishrjain manishrjain removed their request for review April 24, 2019 19:40
@manishrjain
Copy link
Contributor

Defer to @martinmr for review.

Copy link
Contributor

@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.

:lgtm: just one comment about naming.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @codexnull)


dgraph/cmd/live/batch.go, line 196 at r2 (raw file):

	defer l.requestsWg.Done()
	for req := range l.reqs {
		nreq := atomic.AddUint64(&l.reqNum, 1)

Should this also be called reqNum to match the variable inside the loader? Same for all other instances of nreq.

Copy link
Contributor Author

@codexnull codexnull 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, 1 unresolved discussion (waiting on @martinmr)


dgraph/cmd/live/batch.go, line 196 at r2 (raw file):

Previously, martinmr (Martin Martinez Rivera) wrote…

Should this also be called reqNum to match the variable inside the loader? Same for all other instances of nreq.

Yes. Fixed.

Copy link
Contributor

@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.

Reviewed 1 of 1 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@codexnull codexnull merged commit f314b3f into master Apr 25, 2019
@codexnull codexnull deleted the javier/live_load_abort_reporting branch April 25, 2019 18:54
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
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.

3 participants