You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "noob-se7en (via GitHub)" <gi...@apache.org> on 2025/07/04 06:48:49 UTC
[PR] Adds metric to emit consumer sempahore acquire time [pinot]
noob-se7en opened a new pull request, #16278:
URL: https://github.com/apache/pinot/pull/16278
Adds metric to emit consumer sempahore acquire time
--
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] Adds metric to emit consumer sempahore acquire time [pinot]
Posted by "noob-se7en (via GitHub)" <gi...@apache.org>.
noob-se7en commented on code in PR #16278:
URL: https://github.com/apache/pinot/pull/16278#discussion_r2184577298
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/ConsumerCoordinator.java:
##########
@@ -97,6 +97,9 @@ public void acquire(LLCSegmentName llcSegmentName)
while (!_semaphore.tryAcquire(WAIT_INTERVAL_MS, TimeUnit.MILLISECONDS)) {
LOGGER.warn("Failed to acquire consumer semaphore for segment: {} in: {}ms. Retrying.", segmentName,
System.currentTimeMillis() - startTimeMs);
+ _serverMetrics.addTimedTableValue(_realtimeTableDataManager.getTableName(),
Review Comment:
Can do that. Here with timer I would have added alert on any 1 of below
`pinot_server_consumerSemaphoreAcquireTimeMs_OneMinuteRate{database="airlineStats_REALTIME",table="airlineStats_REALTIME.2"} 0.38528746205225817`
`pinot_server_consumerSemaphoreAcquireTimeMs_Count{database="airlineStats_REALTIME",table="airlineStats_REALTIME.1"} 332.0`
--
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] Adds metric to emit consumer sempahore acquire time [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang merged PR #16278:
URL: https://github.com/apache/pinot/pull/16278
--
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] Adds metric to emit consumer sempahore acquire time [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #16278:
URL: https://github.com/apache/pinot/pull/16278#discussion_r2186115486
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/ConsumerCoordinator.java:
##########
@@ -97,6 +97,9 @@ public void acquire(LLCSegmentName llcSegmentName)
while (!_semaphore.tryAcquire(WAIT_INTERVAL_MS, TimeUnit.MILLISECONDS)) {
LOGGER.warn("Failed to acquire consumer semaphore for segment: {} in: {}ms. Retrying.", segmentName,
System.currentTimeMillis() - startTimeMs);
+ _serverMetrics.addTimedTableValue(_realtimeTableDataManager.getTableName(),
Review Comment:
I'm thinking making it a gauge indicating the total wait time (i.e. `System.currentTimeMillis() - startTimeMs`) so that it won't be averaged out. When the lock is acquired, reset the gauge back to 0
--
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] Adds metric to emit consumer sempahore acquire time [pinot]
Posted by "noob-se7en (via GitHub)" <gi...@apache.org>.
noob-se7en commented on code in PR #16278:
URL: https://github.com/apache/pinot/pull/16278#discussion_r2187605329
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/ConsumerCoordinator.java:
##########
@@ -97,6 +97,9 @@ public void acquire(LLCSegmentName llcSegmentName)
while (!_semaphore.tryAcquire(WAIT_INTERVAL_MS, TimeUnit.MILLISECONDS)) {
LOGGER.warn("Failed to acquire consumer semaphore for segment: {} in: {}ms. Retrying.", segmentName,
System.currentTimeMillis() - startTimeMs);
+ _serverMetrics.addTimedTableValue(_realtimeTableDataManager.getTableName(),
Review Comment:
done
--
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] Adds metric to emit consumer sempahore acquire time [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #16278:
URL: https://github.com/apache/pinot/pull/16278#discussion_r2184567718
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/ConsumerCoordinator.java:
##########
@@ -97,6 +97,9 @@ public void acquire(LLCSegmentName llcSegmentName)
while (!_semaphore.tryAcquire(WAIT_INTERVAL_MS, TimeUnit.MILLISECONDS)) {
LOGGER.warn("Failed to acquire consumer semaphore for segment: {} in: {}ms. Retrying.", segmentName,
System.currentTimeMillis() - startTimeMs);
+ _serverMetrics.addTimedTableValue(_realtimeTableDataManager.getTableName(),
Review Comment:
Should we consider emitting this as a gauge for the total wait time? I feel it is easier to alert with a gauge
##########
pinot-common/src/main/java/org/apache/pinot/common/metrics/ServerTimer.java:
##########
@@ -69,6 +69,9 @@ public enum ServerTimer implements AbstractMetrics.Timer {
PREV_SEGMENT_WAIT_TIME_MS("milliseconds", false,
"Time spent while waiting on previous segment to be registered."),
+ CONSUMER_SEMAPHORE_ACQUIRE_TIME_MS("milliseconds", false,
Review Comment:
(minor) Suggest calling it `CONSUMER_SEMAPHORE_ACQUIRE_TIME_MS` as the semaphore is actually used as a lock
--
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] Adds metric to emit consumer sempahore acquire time [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #16278:
URL: https://github.com/apache/pinot/pull/16278#issuecomment-3034921558
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/16278?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `50.00000%` with `2 lines` in your changes missing coverage. Please review.
> Project coverage is 56.30%. Comparing base [(`1a476de`)](https://app.codecov.io/gh/apache/pinot/commit/1a476dea72ebf1c15e14ded28ae60c385f71b2c3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`6e02d12`)](https://app.codecov.io/gh/apache/pinot/commit/6e02d124450714300b2dc29ce499b90c0efe1c61?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 406 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/pinot/pull/16278?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...ore/data/manager/realtime/ConsumerCoordinator.java](https://app.codecov.io/gh/apache/pinot/pull/16278?src=pr&el=tree&filepath=pinot-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fcore%2Fdata%2Fmanager%2Frealtime%2FConsumerCoordinator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL21hbmFnZXIvcmVhbHRpbWUvQ29uc3VtZXJDb29yZGluYXRvci5qYXZh) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/16278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
> :exclamation: There is a different number of reports uploaded between BASE (1a476de) and HEAD (6e02d12). Click for more details.
>
> <details><summary>HEAD has 68 uploads less than BASE</summary>
>
>| Flag | BASE (1a476de) | HEAD (6e02d12) |
>|------|------|------|
>|java-21|10|1|
>|unittests|6|1|
>|unittests1|3|1|
>|skip-bytebuffers-true|4|0|
>|temurin|15|1|
>|unittests2|3|0|
>|skip-bytebuffers-false|8|0|
>|java-11|5|0|
>|integration|9|0|
>|integration2|3|0|
>|integration1|3|0|
>|custom-integration1|3|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #16278 +/- ##
============================================
- Coverage 62.90% 56.30% -6.60%
+ Complexity 1386 699 -687
============================================
Files 2867 2310 -557
Lines 163354 127275 -36079
Branches 24952 20291 -4661
============================================
- Hits 102755 71667 -31088
+ Misses 52847 49698 -3149
+ Partials 7752 5910 -1842
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/16278/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/16278/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration](https://app.codecov.io/gh/apache/pinot/pull/16278/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/16278/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/16278/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-11](https://app.codecov.io/gh/apache/pinot/pull/16278/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-21](https://app.codecov.io/gh/apache/pinot/pull/16278/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.30% <50.00%> (-6.52%)` | :arrow_down: |
| [skip-bytebuffers-false](https://app.codecov.io/gh/apache/pinot/pull/16278/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [skip-bytebuffers-true](https://app.codecov.io/gh/apache/pinot/pull/16278/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/16278/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.30% <50.00%> (-6.60%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/16278/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.30% <50.00%> (-6.60%)` | :arrow_down: |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/16278/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.30% <50.00%> (+0.48%)` | :arrow_up: |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/16278/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 Sentry](https://app.codecov.io/gh/apache/pinot/pull/16278?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] Adds metric to emit consumer sempahore acquire time [pinot]
Posted by "noob-se7en (via GitHub)" <gi...@apache.org>.
noob-se7en commented on code in PR #16278:
URL: https://github.com/apache/pinot/pull/16278#discussion_r2184578589
##########
pinot-common/src/main/java/org/apache/pinot/common/metrics/ServerTimer.java:
##########
@@ -69,6 +69,9 @@ public enum ServerTimer implements AbstractMetrics.Timer {
PREV_SEGMENT_WAIT_TIME_MS("milliseconds", false,
"Time spent while waiting on previous segment to be registered."),
+ CONSUMER_SEMAPHORE_ACQUIRE_TIME_MS("milliseconds", false,
Review Comment:
you meant `CONSUMER_LOCK_WAIT_TIME_MS` ?
--
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] Adds metric to emit consumer sempahore acquire time [pinot]
Posted by "noob-se7en (via GitHub)" <gi...@apache.org>.
noob-se7en commented on code in PR #16278:
URL: https://github.com/apache/pinot/pull/16278#discussion_r2184577298
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/ConsumerCoordinator.java:
##########
@@ -97,6 +97,9 @@ public void acquire(LLCSegmentName llcSegmentName)
while (!_semaphore.tryAcquire(WAIT_INTERVAL_MS, TimeUnit.MILLISECONDS)) {
LOGGER.warn("Failed to acquire consumer semaphore for segment: {} in: {}ms. Retrying.", segmentName,
System.currentTimeMillis() - startTimeMs);
+ _serverMetrics.addTimedTableValue(_realtimeTableDataManager.getTableName(),
Review Comment:
Can do that. Here with timer I would have added alert on any 1 of below
`pinot_server_consumerSemaphoreAcquireTimeMs_OneMinuteRate{database="airlineStats_REALTIME",table="airlineStats_REALTIME.2"} 0.38528746205225817`
`pinot_server_consumerSemaphoreAcquireTimeMs_Count{database="airlineStats_REALTIME",table="airlineStats_REALTIME.1"} 332.0`
Anyways have changeed it
--
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