Apache9 commented on pull request #3268:
URL: https://github.com/apache/hbase/pull/3268#issuecomment-841303798


   As `ServerMetrics` is IA.Public, so do not want to add more methods to it 
only for an intrnal optimization.
   
   The trick is straight forward, in `regionServerStartup`, the 
`LastReportTimestamp` of the created `ServerMetrics` will be 0, while in  
`regionServerReport`, it will be set at region server side so should be a 
positive value. We could use this value to determine whether a region server 
has called `regionServerReport` or not, so we can exclude the region servers 
which have not called `regionServerReport` in 
`ServerManager.createDestinationServersList`.
   
   Added two UTs, one is to make sure we do not assign regions to a region 
server which has not called `regionServerReport` yet. The other is to make sure 
that we will not change the meaning of online servers, as what we have done 
wrong in the first PR for HBASE-25032.
   
   Thanks.


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

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


Reply via email to