SOLR-5577: don't start timer thread on expiration

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1556002 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2014-01-06 19:55:12 +00:00
parent 20506cd63e
commit 277728236b
2 changed files with 8 additions and 2 deletions

View File

@ -196,7 +196,7 @@ Bug Fixes
* SOLR-5577: Likely ZooKeeper expiration should not slow down updates a given
amount, but instead cut off updates after a given time.
(Mark Miller, Christine Poerschke)
(Mark Miller, Christine Poerschke, Ramkumar Aiyengar)
Optimizations
----------------------

View File

@ -110,7 +110,13 @@ public class ConnectionManager implements Watcher {
clientConnected.countDown();
connectionStrategy.connected();
} else if (state == KeeperState.Expired) {
disconnected();
if (disconnectedTimer != null) {
disconnectedTimer.cancel();
disconnectedTimer = null;
}
connected = false;
likelyExpired = true;
log.info("Our previous ZooKeeper session was expired. Attempting to reconnect to recover relationship with ZooKeeper...");
if (beforeReconnect != null) {
beforeReconnect.command();