You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "scottlan0113 (via GitHub)" <gi...@apache.org> on 2026/08/26 01:09:09 UTC
[PR] Fix shared Random and low repeat ratio in BenchmarkIndexedTable [pinot]
scottlan0113 opened a new pull request, #19368:
URL: https://github.com/apache/pinot/pull/19368
## Summary
While investigating #10498 (part of the GROUP BY optimization tracking issue #11924), found two issues in `BenchmarkIndexedTable` that made the benchmark's results misleading:
- `getNewRecord()` used a single `java.util.Random` field shared across all 10 worker threads. `Random` updates an internal seed via CAS, so under concurrent access this itself becomes a contention point unrelated to the `IndexedTable` implementations being benchmarked. In a JFR profile, `Random.next(int)` accounted for over half of all CPU samples, dwarfing the actual table operations. Switched to `ThreadLocalRandom`.
- `NUM_RECORDS` (1000) was close to the key cardinality (100 x 100 = 10,000), so most upserts inserted a new key rather than updating an existing group. This doesn't exercise the repeated-group-update pattern typical of real GROUP BY workloads. Bumped to 100,000 so each group is hit roughly 100 times on average.
## Verification
Ran an isolated before/after comparison (same cardinality, same JMH settings, only swapping `Random` for `ThreadLocalRandom`) to confirm the shared-`Random` issue was materially affecting results, not just a theoretical concern — the relative ordering of `concurrentIndexedTable` vs `simpleIndexedTable` flipped depending on which `Random` implementation was used.
## Test plan
- [x] `mvn -pl pinot-perf compile` succeeds
- [x] Ran `BenchmarkIndexedTable` locally and confirmed consistent results across multiple forks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Fix shared Random and low repeat ratio in BenchmarkIndexedTable [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #19368:
URL: https://github.com/apache/pinot/pull/19368#issuecomment-5419678557
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/19368?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 0.00%. Comparing base ([`4f7023a`](https://app.codecov.io/gh/apache/pinot/commit/4f7023a564ab8363645497a4df7297f54f472283?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`02f8908`](https://app.codecov.io/gh/apache/pinot/commit/02f89086a6a315b4e02b126a20273f96fbbf6d86?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 16 commits behind head on master.
> :exclamation: There is a different number of reports uploaded between BASE (4f7023a) and HEAD (02f8908). Click for more details.
>
> <details><summary>HEAD has 14 uploads less than BASE</summary>
>
>| Flag | BASE (4f7023a) | HEAD (02f8908) |
>|------|------|------|
>|unittests1|1|0|
>|unittests|1|0|
>|java-25|5|2|
>|temurin|5|2|
>|lane-a|2|1|
>|integration|4|2|
>|integration1|2|0|
>|lane-b|2|1|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #19368 +/- ##
=============================================
- Coverage 57.87% 0.00% -57.88%
=============================================
Files 2668 3 -2665
Lines 162330 6 -162324
Branches 26272 0 -26272
=============================================
- Hits 93948 0 -93948
+ Misses 60410 6 -60404
+ Partials 7972 0 -7972
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/19368/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [integration](https://app.codecov.io/gh/apache/pinot/pull/19368/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (-100.00%)` | :arrow_down: |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/19368/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/19368/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | |
| [java-25](https://app.codecov.io/gh/apache/pinot/pull/19368/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (-57.88%)` | :arrow_down: |
| [lane-a](https://app.codecov.io/gh/apache/pinot/pull/19368/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (-100.00%)` | :arrow_down: |
| [lane-b](https://app.codecov.io/gh/apache/pinot/pull/19368/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/19368/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (-57.88%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/19368/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/19368/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/pinot/pull/19368?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Fix shared Random and low repeat ratio in BenchmarkIndexedTable [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang merged PR #19368:
URL: https://github.com/apache/pinot/pull/19368
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org