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

Avoid double restarts of the query server #2884

Merged
merged 3 commits into from
Sep 29, 2023

Conversation

aeisenberg
Copy link
Contributor

@aeisenberg aeisenberg commented Sep 28, 2023

Previously, if there was an explicit restart of the query server (eg- by changing a configuration setting), then the query server process would be started twice: once by the close handler and once by the restart command.

By adding the removeAllListeners to the dispose method, we ensure that when the query server shuts down gracefully, there won't be a close listener that is going to restart it a second time if there is a different way of restarting it.

Replace this with a description of the changes your pull request makes.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

Previously, if there was an explicit restart of the query server (eg-
by changing a configuration setting), then the query server process
would be started twice: once by the `close` handler and once by the
restart command.

By adding the `removeAllListeners` to the dispose method, we ensure that
when the query server shuts down gracefully, there won't be a `close`
listener that is going to restart it a second time if there is a
different way of restarting it.
@aeisenberg aeisenberg requested a review from a team as a code owner September 28, 2023 21:27
Copy link
Contributor

@charisk charisk left a comment

Choose a reason for hiding this comment

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

LGTM

@aeisenberg aeisenberg merged commit 75540b4 into main Sep 29, 2023
30 checks passed
@aeisenberg aeisenberg deleted the aeisenberg/avoid-double-restart branch September 29, 2023 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants