leaktest: ignore pgconn leaked goroutines#102706
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom May 2, 2023
Merged
leaktest: ignore pgconn leaked goroutines#102706craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
We see those in c2c unit tests when using pg connections between the 2 clusters. Note that we already ignored one of those stack traces here cockroachdb#102258 and then reverted that change: cockroachdb@8ecc8f6 but later we saw that we need to ignore both stacks because of cockroachdb#102672. The first fix above was not enough, it was ignoring only one stack. Epic: none Fixes: cockroachdb#97698 Fixes: cockroachdb#97346 Fixes: cockroachdb#102672 Release note: None
Member
msbutler
approved these changes
May 1, 2023
Collaborator
msbutler
left a comment
There was a problem hiding this comment.
In case anyone is wondering why we think this is safe:
- asyncClose uses it's own context
- we think the context watcher goroutine may exit after the test runs its leak check. In other words: in pgx.Conn.Close(ctx), we cancel watched ctx. Context cancellation will cause watching goroutines to exit asynchronously. If the test runs its leak check before these goroutines exit, the leak check fails.
Contributor
Author
|
+1 |
Contributor
|
Build succeeded: |
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.
We see those in c2c unit tests when using pg connections between the 2 clusters.
Note that we already ignored one of those stack traces here #102258 and then reverted that change: 8ecc8f6 but later we saw that we need to ignore both stacks because of #102672.
The first fix above was not enough, it was ignoring only one stack.
Epic: none
Fixes: #97698
Fixes: #97346
Fixes: #102672
Release note: None