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

Replace shutdownCh and wait groups to a y.Closer for shutting down Alpha #5560

Merged
merged 2 commits into from
Jun 22, 2020

Conversation

pawanrawal
Copy link
Contributor

@pawanrawal pawanrawal commented Jun 2, 2020

Earlier we had worker.ShutdownCh which was used to pass information between alpha/run.go and graphql/admin.go which was causing confusion and was being used to stop the worker itself. We now have a y.Closer in graphql/admin which manages the WaitGroup and passing of signals between goroutines using channels.

Fixes DGRAPH-1169


This change is Reviewable

@github-actions github-actions bot added the area/graphql Issues related to GraphQL support on Dgraph. label Jun 2, 2020
@jarifibrahim
Copy link
Contributor

jarifibrahim commented Jun 4, 2020

Can't we use y.Closer instead of shutdown channel?

Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

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

:lgtm: The PR title needs to be fixed. I tried to manually verify this PR but we have another issue with shutdown #5627

Reviewable status: 0 of 4 files reviewed, all discussions resolved (waiting on @manishrjain, @MichaelJCompton, and @vvbalaji-dgraph)

@pawanrawal pawanrawal changed the title Move the ShutdownCh to admin package and remove traces of it from the worker package. Replace shutdownCh and wait groups to a y.Closer for shutting down Alpha Jun 10, 2020
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 2 of 4 files at r1, 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @MichaelJCompton and @vvbalaji-dgraph)

@pawanrawal pawanrawal merged commit 2d6de94 into master Jun 22, 2020
@pawanrawal pawanrawal deleted the pawanrawal/dgraph-1169 branch June 22, 2020 05:42
martinmr pushed a commit that referenced this pull request Jul 2, 2020
…pha (#5560)

Earlier we had worker.ShutdownCh which was used to pass information between alpha/run.go and graphql/admin.go which was causing confusion and was being used to stop the worker itself. We now have a y.Closer in graphql/admin which manages the WaitGroup and passing of signals between goroutines using channels.

Fixes DGRAPH-1169
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 18, 2020
…pha (hypermodeinc#5560)

Earlier we had worker.ShutdownCh which was used to pass information between alpha/run.go and graphql/admin.go which was causing confusion and was being used to stop the worker itself. We now have a y.Closer in graphql/admin which manages the WaitGroup and passing of signals between goroutines using channels.

Fixes DGRAPH-1169
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/graphql Issues related to GraphQL support on Dgraph.
Development

Successfully merging this pull request may close these issues.

3 participants