jugomezv commented on code in PR #10104:
URL: https://github.com/apache/pinot/pull/10104#discussion_r1068735243


##########
pinot-common/src/main/java/org/apache/pinot/common/metrics/AbstractMetrics.java:
##########
@@ -707,15 +708,16 @@ public void removeTableGauge(final String tableName, 
final G gauge) {
 
 
   /**
+   * @deprecated please use removeTableGauge(final String tableName, final 
String key, final G gauge) instead
+   *
    * Removes a table gauge given the table name and the gauge.
    * The add/remove is expected to work correctly in case of being invoked 
across multiple threads.
    * @param tableName table name
+   * @param partitionId The partition id
    * @param gauge the gauge to be removed
    */
   public void removePartitionGauge(final String tableName, final int 
partitionId, final G gauge) {

Review Comment:
   currently I see the code is as follows:
   ```
    public void addCallbackPartitionGaugeIfNeeded(final String tableName, final 
int partitionId, final G gauge,
         final Callable<Long> valueCallback) {
       final String fullGaugeName = composeTableGaugeName(tableName, 
String.valueOf(partitionId), gauge);
       addCallbackGaugeIfNeeded(fullGaugeName, valueCallback);
     }
   ```
   
   so I dont see the Supplier being passed, I also see that the call this used 
is guarded to not add again so current name makes sense, may be I am missing 
something?:
   public void addCallbackGaugeIfNeeded(final String metricName, final 
Callable<Long> valueCallback) {
   ```
       if (!_gaugeValues.containsKey(metricName)) {
         synchronized (_gaugeValues) {
           if (!_gaugeValues.containsKey(metricName)) {
             _gaugeValues.put(metricName, new AtomicLong(0L));
             addCallbackGauge(metricName, valueCallback);
           }
         }
       }
     }
   ```



-- 
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