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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to