mcvsubbu commented on a change in pull request #4553: Refactor
ControllerLeaderLocator
URL: https://github.com/apache/incubator-pinot/pull/4553#discussion_r324931161
##########
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:
You dont need visibleForTesting here
----------------------------------------------------------------
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]