zhtaoxiang commented on PR #10104:
URL: https://github.com/apache/pinot/pull/10104#issuecomment-1381196926

   > @zhtaoxiang it will be useful to understand the motivation behind these 
"deprecation" PRs. What exactly are we after? Is it code cleanup? To propose to 
deprecate an API one day after it was added does seem strange. Is it only 
metrics APIs that you are concerned with, or are you going to clean up a lot of 
code here?
   
   The goal is to revise the current gauge metrics. 
   
   Specifically, there is a `_gaugeValues` variable in defined in 
`org.apache.pinot.common.metrics.AbstractMetrics`, which is a walk around to 
make gauge value changable. 
   1/ This solution is not consistent with how metric and timer are 
implemented, which relies purely on metric registry
   2/ when we update gauges, we are updating `_gaugeValues`, but gauges in 
metric registry directly. I discovered gauge discrepencies in some test cases
   3/ `_gaugeValues` solves the problem that a gauge value cannot be updated, 
but it does not solve the problem that a gauge `callable` cannot be updated
   4/ methods with name `callback` are not accurate.
   
   I had a PR (https://github.com/apache/pinot/pull/9961) to make gauge 
updatable. With that, we can now get rid of `_gaugeValues` and fix the above 
problems. I am now doing this step by step.
   
   To answer your questions:
   1/ it is not only code clean up, but also fixing some issues.
   2/ We are making changes simutenously, so there are some conflicts (that's 
why we have discussions here)
   3/ It's not only about API, but also logic clean up. However, there will not 
be a lot of code here.
   
   I am happy to set up a meeting to discuss those in more 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-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