You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/09/30 18:02:53 UTC

[GitHub] [nifi] joewitt commented on a change in pull request #3670: Cache results from zookeeper when determining the leader

joewitt commented on a change in pull request #3670: Cache results from zookeeper when determining the leader
URL: https://github.com/apache/nifi/pull/3670#discussion_r329711882
 
 

 ##########
 File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/leader/election/CuratorLeaderElectionManager.java
 ##########
 @@ -446,27 +446,51 @@ public String getParticipantId() {
         private final String participantId;
 
         private volatile boolean leader;
+        private long leaderUpdateTimestamp = 0L;
+        private final long MAX_CACHE_MILLIS = TimeUnit.SECONDS.toMillis(60L);
 
 Review comment:
   @markap14 overall this looks like a good change/idea.  How about though we only increase the time at which it could be wrong on its role to no more than 5 seconds for now?  We can learn from its behavior over time and decide whether to increase or decrease?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services