narendly commented on a change in pull request #636: Simply and enhance the RebalanceLatencyGauge so it can be used in multi-threads. URL: https://github.com/apache/helix/pull/636#discussion_r352013634
########## File path: helix-core/src/main/java/org/apache/helix/monitoring/metrics/implementation/RebalanceLatencyGauge.java ########## @@ -30,6 +31,7 @@ private static final Logger LOG = LoggerFactory.getLogger(RebalanceLatencyGauge.class); private static final long VALUE_NOT_SET = -1; private long _lastEmittedMetricValue = VALUE_NOT_SET; + private final ThreadLocal<Long> _startTime; Review comment: As I suggested in the PR (https://github.com/apache/helix/pull/632), could we please add some meaningful inline comments about why we are making this a ThreadLocal? It would be very helpful in the future to have the context here because people will be reading the code and not necessarily this PR description. ---------------------------------------------------------------- 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] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
