Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roachtest: use atomic pointer for logger #140604

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

DarrylWong
Copy link
Contributor

The test runner swaps out the test logger when running post test artifacts collection and checks. However, in the case of a timeout, the test goroutine may still be running and have access to the test logger. This leads to a race condition where the logger is replaced as it's being used by the test.

This change switches the test logger to use an atomic pointer instead.

Fixes: none
Epic: none
Release note: none

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@DarrylWong DarrylWong marked this pull request as ready for review February 6, 2025 19:07
@DarrylWong DarrylWong requested a review from a team as a code owner February 6, 2025 19:07
@DarrylWong DarrylWong requested review from herkolategan and golgeek and removed request for a team February 6, 2025 19:07
The test runner swaps out the test logger when running post
test artifacts collection and checks. However, in the case of
a timeout, the test goroutine may still be running and have
access to the test logger. This leads to a race condition where
the logger is replaced as it's being used by the test.

This change switches the test logger to use an atomic pointer
instead.
@DarrylWong
Copy link
Contributor Author

TFTRs!

bors=srosenberg,herkolategan

@DarrylWong
Copy link
Contributor Author

Oops forgot the r 😛

bors r=srosenberg,herkolategan

craig bot pushed a commit that referenced this pull request Feb 11, 2025
138834: kvserver,storeliveness: introduce follower quiescence r=arulajmani,iskettaneh a=miraradeva

This commit introduces the ability for followers on inactive ranges to quiesce and stop ticking in Raft. This will allow the CPU utilization of the cluster to decrease by a factor of 2/3 (assuming RF3).

Unlike epoch lease quiescence, which also quiesces the leader under certain conditions, store liveness quiescence is much simpler. The conditions to quiesce/unquiesce are:

- Quiesce a follower if it hasn't received Raft messages in a certain number of ticks and the follower's store provides store liveness support for the leader's store.

- Unquiesce a follower if it hears from store liveness that the follower's store has withdrawn support from the leader's store.

Fixes: #133885

Release note: None

140604: roachtest: use atomic pointer for logger r=srosenberg,herkolategan a=DarrylWong

The test runner swaps out the test logger when running post test artifacts collection and checks. However, in the case of a timeout, the test goroutine may still be running and have access to the test logger. This leads to a race condition where the logger is replaced as it's being used by the test.

This change switches the test logger to use an atomic pointer instead.

Fixes: none
Epic: none
Release note: none

140960: sql: deflake TestDropDatabaseDeleteData r=iskettaneh a=iskettaneh

This commit deflakes the test by blocking the full reconciliation from starting before we drop the database. This is used to avoid a race condition where the full reconciliation starts after we drop the database, it will ignore the dropped database. Then, there is a race between the SQLWatcher and the GC job where the SQLWatcher might write a zone config of table1 before table2, while the GC queue might not know that this range needs to be split because it has different span config.

Release note: None

Fixes: #138185

141040: docs: update diagrams.go for removed restore syntax r=msbutler a=kev-cao

The old restore syntax was removed in #135135 and with it, the `list_of_string_or_placeholder` was removed. `diagrams.go`'s entry for `restore_stmt` was not updated accordingly, resulting in a bad match in the `.bnf` files.

Epic: none

Release note: None

Co-authored-by: Mira Radeva <[email protected]>
Co-authored-by: DarrylWong <[email protected]>
Co-authored-by: Ibrahim Kettaneh <[email protected]>
Co-authored-by: Kevin Cao <[email protected]>
@craig
Copy link
Contributor

craig bot commented Feb 11, 2025

Build failed (retrying...):

  • unit_tests

@craig craig bot merged commit 004b3d4 into cockroachdb:master Feb 11, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants