rahulrane50 commented on PR #2344:
URL: https://github.com/apache/helix/pull/2344#issuecomment-1401049891

   TFTR @mgao0 please find answers inline!
   > Thanks for the PR. I have several general question:
   > 
   > 1. Is there a reason why we need a long-running thread for 
AsyncMissingTopStateMonitor?  Can we couple the update of ResourceMonitor with 
the update of updateMissingTopStateResourceMap in ClusterStatusMonitor, instead 
of checking the map periodically?
   --> The reason of decoupling metric reporting with existing main process of 
clusterstatusmonitor is to report metric irrespective of any event is being 
handled or not. Hence we couple of this with clusterstatusmonitor then thread 
will report metric only when resourcemap is updated ie., any event happens. 
About long-running thread, it sleeps whenever all resources have all partitions 
with top state recovered. To save some resources i had added a sleep in thread.
   > 2. Can we make this metric as optional, one that can be turned on and 
turned off by config?
   --> That's a good point! To be honest i'm not sure. In my mind this is very 
small features hence guarding it behind flag may not be that useful. In terms 
resource usage or performance it should not that much since it's single thread 
which should be running only when any resources have any partitions with 
missing top state. I'm open for suggestions though :)
   
   


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