mirror of https://github.com/apache/nifi.git
NIFI-8969: Fix Maximum Polling Time in CuratorLeaderElectionManager
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes #5270.
This commit is contained in:
parent
3621a2182c
commit
44f7a2f5b5
|
@ -330,8 +330,8 @@ public class CuratorLeaderElectionManager implements LeaderElectionManager {
|
|||
return 0L;
|
||||
}
|
||||
|
||||
final long minNanos = aggregation.getMin();
|
||||
return timeUnit.convert(minNanos, TimeUnit.NANOSECONDS);
|
||||
final long maxNanos = aggregation.getMax();
|
||||
return timeUnit.convert(maxNanos, TimeUnit.NANOSECONDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -578,7 +578,6 @@ public class CuratorLeaderElectionManager implements LeaderElectionManager {
|
|||
listener.onLeaderElection();
|
||||
} catch (final Exception e) {
|
||||
logger.error("This node was elected Leader for Role '{}' but failed to take leadership. Will relinquish leadership role. Failure was due to: {}", roleName, e);
|
||||
logger.error("", e);
|
||||
setLeader(false);
|
||||
Thread.sleep(1000L);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue