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

Shutdown executor goroutines #5130

Merged
merged 5 commits into from
Apr 9, 2020
Merged

Shutdown executor goroutines #5130

merged 5 commits into from
Apr 9, 2020

Conversation

animesh2049
Copy link
Contributor

@animesh2049 animesh2049 commented Apr 7, 2020

We were not waiting for the executor goroutines to shutdown. Also we were trying to close the goroutines as soon as ctrl+c is hit.
This change would ensure that all the pending mutations are applied before goroutines are shutdown.
And we are also waiting for all such executor goroutines to finish before dgraph shuts down.


This change is Reviewable

@animesh2049 animesh2049 requested review from manishrjain and a team as code owners April 7, 2020 19:37
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: Can you mention the JIRA ticket this corresponds to?

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

@jarifibrahim
Copy link
Contributor

I see the following error on this branch line https://github.com/dgraph-io/dgraph/pull/5130/files#diff-e7949a0879bc67d5514e8a008bab05bfR909

0408 17:13:56.450455    9239 draft.go:911] =============ex nil %!(EXTRA bool=true)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x14464d1]

goroutine 290 [running]:
github.com/dgraph-io/dgraph/worker.(*node).checkpointAndClose(0xc0002a0540, 0xc000424660, 0xc0002927e0)
	/home/ibrahim/Projects/go/src/github.com/dgraph-io/dgraph/worker/draft.go:912 +0x741
created by github.com/dgraph-io/dgraph/worker.(*node).Run
	/home/ibrahim/Projects/go/src/github.com/dgraph-io/dgraph/worker/draft.go:949 +0x1d0
[Sentry] 2020/04/08 17:13:56 Sending fatal event [17490d180a294aed80bd0bdbc820bc8b] to sentry.io project: 1805390
[Sentry] 2020/04/08 17:13:57 Buffer flushed successfully.

@animesh2049
Copy link
Contributor Author

Thanks for pointing @jarifibrahim . My recent commit should have fixed the issue.

@animesh2049 animesh2049 merged commit 08df420 into master Apr 9, 2020
animesh2049 added a commit that referenced this pull request Apr 9, 2020
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 18, 2020
@joshua-goldstein joshua-goldstein deleted the mrjn/executor-shutdown branch August 11, 2022 20:39
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