-
Notifications
You must be signed in to change notification settings - Fork 455
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
[tests] Improved embedded coordinator support #3779
Conversation
@jaredjenkins PR addresses this comment: #3759 (comment) |
63fde68
to
c5e959a
Compare
b9d3f00
to
7632e3a
Compare
Codecov Report
@@ Coverage Diff @@
## master #3779 +/- ##
========================================
Coverage ? 56.8%
========================================
Files ? 552
Lines ? 62992
Branches ? 0
========================================
Hits ? 35832
Misses ? 23964
Partials ? 3196
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
@@ -248,6 +254,12 @@ func (c *coordinator) WaitForShardsReady() error { | |||
} | |||
|
|||
func (c *coordinator) Close() error { | |||
if c.embedded { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if this just handled double closes sanely regardless of embedded or not.
c5e959a
to
aad6cfd
Compare
Passing the interrupt channel to multiple goroutines could cause a race where the main thread ends up missing the interrupt that triggers a server shutdown. This commit ensures that only a single goroutine is listening for the interrupt at a given time and all other interested parties can check the interrupted channel. The interrupted channel will be closed as soon as an interrupt is received. Since closed channels return immediately, this allows any interested goroutine to know if it should terminate by simply checking the interrupted channel.
aad6cfd
to
91a7015
Compare
This commit fixes a couple small things re: embedded coordinators: 1) Fails fast if dbnode is not started when creating an embedded coordinator. 2) Adds support for port and filepath replacement in embedded config.
7632e3a
to
a0958f2
Compare
This commit fixes a couple small things re: embedded coordinators: 1) Fails fast if dbnode is not started when creating an embedded coordinator. 2) Adds support for port and filepath replacement in embedded config.
What this PR does / why we need it:
This commit fixes a couple small things re: embedded coordinators:
Fails fast if dbnode is not started when creating an embedded
coordinator.
Adds support for port and filepath replacement in embedded
config.
Special notes for your reviewer:
Does this PR introduce a user-facing and/or backwards incompatible change?:
Does this PR require updating code package or user-facing documentation?: