Skip to content

Avoid double restarts of the query server#2884

Merged
aeisenberg merged 3 commits intomainfrom
aeisenberg/avoid-double-restart
Sep 29, 2023
Merged

Avoid double restarts of the query server#2884
aeisenberg merged 3 commits intomainfrom
aeisenberg/avoid-double-restart

Conversation

@aeisenberg
Copy link
Copy Markdown
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
Copy Markdown
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
@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