Skip to content

leaktest: ignore pgconn leaked goroutines#102706

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
lidorcarmel:lidor_c2c_ignore_leaked_goroutine
May 2, 2023
Merged

leaktest: ignore pgconn leaked goroutines#102706
craig[bot] merged 1 commit intocockroachdb:masterfrom
lidorcarmel:lidor_c2c_ignore_leaked_goroutine

Conversation

@lidorcarmel
Copy link
Copy Markdown
Contributor

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

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
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@msbutler msbutler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@lidorcarmel lidorcarmel added the backport-23.1.x PAST MAINTENANCE SUPPORT: 23.1 patch releases via ER request only label May 2, 2023
@lidorcarmel
Copy link
Copy Markdown
Contributor Author

+1
TFTR!
bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 2, 2023

Build succeeded:

@craig craig bot merged commit f3ec037 into cockroachdb:master May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-23.1.x PAST MAINTENANCE SUPPORT: 23.1 patch releases via ER request only

Projects

None yet

3 participants