Conversation
sreya
commented
Aug 5, 2024
- Fixes an issue where a coordinator deletes all its peers on shutdown. This can cause disconnects whenever a coderd is redeployed.
- Fixes an issue where a coordinator deletes all its peers on shutdown. This can cause disconnects whenever a coderd is redeployed.
spikecurtis
left a comment
There was a problem hiding this comment.
I added a bunch of stuff in #12155 to ensure that the binder and tunneler complete before the querier closes, since that would delete the Coordinator row from the DB. Now that we aren't deleting that row, the ordering isn't necessary, and there are comments I added that are no longer true.
I think we should keep the tracking of when things shut down, though, so that Close() doesn't return while there are still PGCoordinator goroutines running.
spikecurtis
left a comment
There was a problem hiding this comment.
I like the use of the single query for cleanup, and the new tests.
The only blocking issue, I think, is the race with the binding workers.
A few other minor comments inline as well.
spikecurtis
left a comment
There was a problem hiding this comment.
Minor issue inline, but I don't need to review again.