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

ci/roachtest: fix typo in roachtest nightly wrapper #140675

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

srosenberg
Copy link
Member

@srosenberg srosenberg commented Feb 7, 2025

Previous PR [1] had a typo which caused
RC runs to fail due to using an
invalid CLI arg.

[1] #137653

Epic: none

Release note: None
Release Justification: ci-only change

Previous PR [1] had a typo which caused
RC runs to fail due to using an
invalid CLI arg.

[1] cockroachdb#137653

Epic: none

Release note: None
@srosenberg srosenberg requested a review from a team as a code owner February 7, 2025 15:05
@srosenberg srosenberg requested review from a team, herkolategan and golgeek and removed request for a team February 7, 2025 15:05
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@srosenberg srosenberg added backport-25.1.0-rc (requires approval from AlexL) backport-25.1.x Flags PRs that need to be backported to 25.1 labels Feb 7, 2025
Copy link
Contributor

@DarrylWong DarrylWong left a comment

Choose a reason for hiding this comment

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

Thanks for fixing!

@srosenberg
Copy link
Member Author

TFTR!

@srosenberg
Copy link
Member Author

bors r=darrylwong

craig bot pushed a commit that referenced this pull request Feb 7, 2025
140409: metric: remove mutex around windowed histogram update r=dhartunian a=dhartunian

Previously, we used an `RWMutex` to serialize access to the windowed histogram. This was done because there's a rotation that needs to happen that moves the currently active histogram into the `prev` variable and creates a fresh one to update in `cur`. This is done to maintain the window.

This change limits the mutex usage to rotation and window snapshotting, removing the need to take a read lock during updates since we can atomically grab the `cur` histogram.

There's a bit of nuance to manage around the fact that `prev` can be nil on the first iteration, since `cur` is the first histogram. After a single rotation, `prev` will not be nil again.

The prometheus histogram itself (what's stored in the `atomic.Value`) is thread-safe.

```
old:  dhartunian@507c68f Merge #140092
new:  dhartunian@ff9dd52 metric: remove mutex around windowed histogram upd
args: benchdiff "./pkg/util/metric" "-b" "-r" "BenchmarkHistogramRecordValue" "-c" "10" "--preview"

name                                     old time/op    new time/op    delta
HistogramRecordValue/insert_zero-10        30.7ns ± 8%    24.3ns ± 2%  -20.94%  (p=0.000 n=9+8)
HistogramRecordValue/insert_integers-10    37.4ns ± 6%    33.8ns ± 1%   -9.83%  (p=0.000 n=8+8)
HistogramRecordValue/random_integers-10    44.9ns ± 9%    41.7ns ± 1%   -7.25%  (p=0.000 n=8+8)

name                                     old alloc/op   new alloc/op   delta
HistogramRecordValue/insert_integers-10     0.00B          0.00B          ~     (all equal)
HistogramRecordValue/insert_zero-10         0.00B          0.00B          ~     (all equal)
HistogramRecordValue/random_integers-10     0.00B          0.00B          ~     (all equal)

name                                     old allocs/op  new allocs/op  delta
HistogramRecordValue/insert_integers-10      0.00           0.00          ~     (all equal)
HistogramRecordValue/insert_zero-10          0.00           0.00          ~     (all equal)
HistogramRecordValue/random_integers-10      0.00           0.00          ~     (all equal)
```

Part of #133306

Release note: None

140675: ci/roachtest: fix typo in roachtest nightly wrapper r=darrylwong a=srosenberg

Previous PR [1] had a typo which caused
RC runs to fail due to using an
invalid CLI arg.

[1] #137653

Epic: none

Release note: None
Release Justification: ci-only change

Co-authored-by: David Hartunian <[email protected]>
Co-authored-by: Stan Rosenberg <[email protected]>
@craig
Copy link
Contributor

craig bot commented Feb 7, 2025

Build failed (retrying...):

@craig craig bot merged commit cf3cf8f into cockroachdb:master Feb 7, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-25.1.x Flags PRs that need to be backported to 25.1 backport-25.1.0-rc (requires approval from AlexL)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants