Skip to content

Conversation

@tbg
Copy link
Member

@tbg tbg commented Oct 27, 2025

Backport 1/1 commits from #156288 on behalf of @tbg.


The statsLoop could still be running. In the linked test flake below, we see it call (*pebble).GetMetrics when the engines are already closed.

Rearrange the code so that we wait for statsLoop to terminate properly before exiting the test.

Closes #156138.

Epic: none


Release justification:

The `statsLoop` could still be running. In the linked test flake below, we see
it call `(*pebble).GetMetrics` when the engines are already closed.

Rearrange the code so that we wait for `statsLoop` to terminate properly before exiting the test.

Closes cockroachdb#156138.

Epic: none
@tbg tbg requested a review from a team as a code owner October 27, 2025 18:22
@tbg tbg force-pushed the blathers/backport-release-25.2-156288 branch from c4e67fa to 07ce565 Compare October 27, 2025 18:22
@blathers-crl blathers-crl bot added blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. labels Oct 27, 2025
@blathers-crl blathers-crl bot requested review from arulajmani and pav-kv October 27, 2025 18:22
@blathers-crl
Copy link

blathers-crl bot commented Oct 27, 2025

Thanks for opening a backport.

Before merging, please confirm that it falls into one of the following categories (select one):

  • Non-production code changes. Includes test-only changes, build system changes, etc.
  • Fixes for serious issues. Defined in the policy as correctness, stability, or security issues, data corruption/loss, significant performance regressions, breaking working and widely used functionality, or an inability to detect and debug production issues.
  • Other approved changes. These changes must be gated behind a disabled-by-default feature flag unless there is a strong justification not to.

Add a brief release justification to the PR description explaining your selection.

Also, confirm that the change does not break backward compatibility and complies with all aspects of the backport policy.

All backports must be reviewed by the TL and EM for the owning area.

@blathers-crl blathers-crl bot added backport Label PR's that are backports to older release branches T-kv KV Team labels Oct 27, 2025
@blathers-crl
Copy link

blathers-crl bot commented Oct 27, 2025

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl
Copy link

blathers-crl bot commented Oct 27, 2025

✅ PR #156297 is compliant with backport policy

Confidence: high
Critical bug criteria met: [Stability or security issues]
Backward compatible: true
Explanation: The PR addresses a critical bug related to the behavior of the statsLoop possibly running after the engines have been closed, which could lead to invalid memory access or data races. This aligns with the CockroachDB backport policy's critical bug criteria because it directly impacts stability by preventing potential runtime errors in test code. The patch in pkg/kv/kvserver/raftstorebench/bench.go adjusts the lifecycle management of goroutines and context cancellation to ensure proper cleanup before test shutdown, which is crucial for test reliability and correctness. Since the change is focused on improving stability in a testing environment, and though it does affect production files, its nature is crucial for maintaining the robustness of the testing process.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg tbg merged commit c61c6e9 into cockroachdb:release-25.2 Oct 29, 2025
15 of 16 checks passed
@tbg tbg deleted the blathers/backport-release-25.2-156288 branch October 29, 2025 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Label PR's that are backports to older release branches blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. T-kv KV Team target-release-25.2.9

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants