When restarting the query server wait for the old one to stop properly#4465
Closed
josefs wants to merge 1 commit into
Closed
When restarting the query server wait for the old one to stop properly#4465josefs wants to merge 1 commit into
josefs wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Ensures query-server restarts wait for the previous process to terminate, reducing Windows file-lock failures.
Changes:
- Adds process-exit waiting with timeout and forced termination.
- Uses exit waiting during query-server restarts.
- Adds unit tests and a changelog entry.
Show a summary per file
| File | Description |
|---|---|
server-process.ts |
Adds process-exit waiting logic. |
query-server-client.ts |
Waits before starting the replacement server. |
server-process.test.ts |
Tests exit and timeout behavior. |
CHANGELOG.md |
Documents the reliability fix. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Medium
Comment on lines
+64
to
+65
| this.child.kill("SIGKILL"); | ||
| resolve(); |
Contributor
Author
|
Closed in favor of #4464 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some of the Windows tests have been very flaky. I particularly experience that on #4455
The problem is restarting the query server. The current code doesn't wait for the old server to stop properly. On Windows, the old process will hold locks on the file and if the new server starts up too quickly it will fail to open those files.
This PR makes sure to wait for the old server process to close properly (with a timeout, just to be sure) before opening the new one.
I don't know if people are experiencing any problems with this in practice, but it's good to have less flaky tests.