mirror of https://github.com/apache/lucene.git
SOLR-6570: Run SolrZkClient session watch asynchronously.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1640566 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
17081c0f19
commit
7cd7552a4b
|
@ -397,6 +397,9 @@ Other Changes
|
|||
|
||||
* SOLR-6740: Admin UI - improve Files View (steffkes)
|
||||
|
||||
* SOLR-6570: Run SolrZkClient session watch asynchronously.
|
||||
(Ramkumar Aiyengar via Mark Miller)
|
||||
|
||||
================== 4.10.3 ==================
|
||||
|
||||
Bug Fixes
|
||||
|
|
|
@ -140,7 +140,7 @@ public class ConnectionManager implements Watcher {
|
|||
closeKeeper(keeper);
|
||||
throw new RuntimeException(e1);
|
||||
}
|
||||
|
||||
|
||||
log.info("Connection with ZooKeeper reestablished.");
|
||||
try {
|
||||
client.updateKeeper(keeper);
|
||||
|
@ -154,24 +154,9 @@ public class ConnectionManager implements Watcher {
|
|||
throw new RuntimeException(t);
|
||||
}
|
||||
|
||||
// The new event thread will call connected
|
||||
// we just start the reconnect thread and
|
||||
// do nothing else
|
||||
|
||||
if (onReconnect != null) {
|
||||
Thread thread = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
onReconnect.command();
|
||||
} catch (Exception e) {
|
||||
log.warn("Exception running onReconnect command", e);
|
||||
}
|
||||
}
|
||||
};
|
||||
thread.start();
|
||||
onReconnect.command();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -144,7 +144,7 @@ public class SolrZkClient implements Closeable {
|
|||
+ zkServerAddress, this, zkServerAddress, strat, onReconnect, beforeReconnect);
|
||||
|
||||
try {
|
||||
strat.connect(zkServerAddress, zkClientTimeout, connManager,
|
||||
strat.connect(zkServerAddress, zkClientTimeout, wrapWatcher(connManager),
|
||||
new ZkUpdate() {
|
||||
@Override
|
||||
public void update(SolrZooKeeper zooKeeper) {
|
||||
|
|
Loading…
Reference in New Issue