Client
e.g. Spanner
Environment
We have goleak configured for some test suites that use spanner, which have started failing since v1.91.0.
The endpointLatencyRegistry which was added starts a package-level runCleanup goroutine, and does not expose a way to opt out or stop, and it continues to run when all spanner clients are closed.
Is this expected behaviour that we now need to ignore in our goleak tests? Or do you have any other recommendation?
Code and Dependencies
lock_test.go:358: found unexpected goroutines:
[Goroutine 41 in state select, with cloud.google.com/go/spanner.(*endpointLatencyRegistry).runCleanup on top of the stack:
cloud.google.com/go/spanner.(*endpointLatencyRegistry).runCleanup(0xc0002f04d0)
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.91.0/endpoint_latency_registry.go:251 +0x24d
created by cloud.google.com/go/spanner.newEndpointLatencyRegistry in goroutine 1
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.91.0/endpoint_latency_registry.go:83 +0x2df
]
Expected behavior
Spawned go routines should be stopped when no longer needed. And their lifecycle documented if needed throughout the lifecycle of the process.
Client
e.g. Spanner
Environment
We have goleak configured for some test suites that use spanner, which have started failing since v1.91.0.
The
endpointLatencyRegistrywhich was added starts a package-levelrunCleanupgoroutine, and does not expose a way to opt out or stop, and it continues to run when all spanner clients are closed.Is this expected behaviour that we now need to ignore in our goleak tests? Or do you have any other recommendation?
Code and Dependencies
Expected behavior
Spawned go routines should be stopped when no longer needed. And their lifecycle documented if needed throughout the lifecycle of the process.