jackjlli commented on a change in pull request #4553: Refactor ControllerLeaderLocator URL: https://github.com/apache/incubator-pinot/pull/4553#discussion_r325333377
########## File path: pinot-core/src/main/java/org/apache/pinot/server/realtime/ControllerLeaderLocator.java ########## @@ -229,22 +246,27 @@ private boolean isLeadControllerResourceEnabled() { * Thus the frequency limiting is done to guard against frequent cache refreshes, in cases where we might be getting too many NOT_SENT responses due to some other errors. */ public synchronized void invalidateCachedControllerLeader() { - long now = System.currentTimeMillis(); + long now = getCurrentTimeMS(); long millisSinceLastInvalidate = now - _lastCacheInvalidateMillis; if (millisSinceLastInvalidate < MILLIS_BETWEEN_INVALIDATE) { LOGGER.info( "Millis since last controller cache value invalidate {} is less than allowed frequency {}. Skipping invalidate.", millisSinceLastInvalidate, MILLIS_BETWEEN_INVALIDATE); } else { LOGGER.info("Invalidating cached controller leader value"); - _cachedControllerLeaderInvalid = true; + _cachedControllerLeaderValid = false; _lastCacheInvalidateMillis = now; } } @VisibleForTesting Review comment: Done. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org