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

Wait for running queries issued during grace period to finish #2648

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

sopel39
Copy link
Member

@sopel39 sopel39 commented Jan 28, 2020

Related to: #2621
Fixes one race condition between worker shutting down and issuing new queries by coordinator

@sopel39 sopel39 requested a review from dain January 28, 2020 13:03
@cla-bot cla-bot bot added the cla-signed label Jan 28, 2020
// wait for another grace period for all task states to be observed by the coordinator
sleepUninterruptibly(gracePeriod.toMillis(), MILLISECONDS);
// wait for another grace period for all task states and shutting down state to be observed by the coordinator
sleepUninterruptibly(gracePeriod.toMillis(), MILLISECONDS);
Copy link
Member

Choose a reason for hiding this comment

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

We need to wait at least once.... actually, I maybe we should wait first, and then shutdown once all tasks exit.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@sopel39
Copy link
Member Author

sopel39 commented Jan 30, 2020

ac

@dain dain removed their assignment Feb 20, 2020
@sopel39 sopel39 merged commit 083df41 into trinodb:master Feb 20, 2020
@sopel39 sopel39 deleted the ks/graceful_shutting_down branch February 20, 2020 11:29
@sopel39 sopel39 mentioned this pull request Feb 20, 2020
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants