somandal opened a new pull request, #15479:
URL: https://github.com/apache/pinot/pull/15479

   As part of PR https://github.com/apache/pinot/pull/15392 metrics were added 
for tracking segment throttle thresholds and count of the operations undergoing 
the given operation. The metrics only show up as 0 in spite of the changes.
   
   On debugging, found the following:
   - `ServerMetrics` are initialized to NOOP at the start
   - `SegmentOperationsThrottler` is created and passed to `ServerInstance`. 
This object needs to set up the metrics and initialize them, but at this point 
the `ServerMetrics` object is still NOOP
   - `ServerInstance` is created, and in the constructor `ServerMetrics` is 
actually created and registered, where the correct `ServerMetrics` object is 
set up
   
   To address the above, I've added:
   - New `initializeMetrics` method to `BaseSegmentOperationsThrottler` and 
`SegmentOperationsThrottler` objects
   - Call the above method in `ServerInstance` after the `ServerMetrics` are 
created and registered
   
   It is safe to do the above because we have not yet registered 
`SegmentOperationsThrottler` with the `InstanceDataManager` so no segment 
operations are happening yet.
   
   Testing:
   - Verified in the debugger that the above code is correctly called and the 
NOOP `ServerInstance` is replaced with the newly registered `ServerInstance` 
which is not the NOOP variant
   
   cc @klsince @Jackie-Jiang 


-- 
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-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to