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-6740: Admin UI - improve Files View (steffkes)
|
||||||
|
|
||||||
|
* SOLR-6570: Run SolrZkClient session watch asynchronously.
|
||||||
|
(Ramkumar Aiyengar via Mark Miller)
|
||||||
|
|
||||||
================== 4.10.3 ==================
|
================== 4.10.3 ==================
|
||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
|
|
|
@ -154,25 +154,10 @@ public class ConnectionManager implements Watcher {
|
||||||
throw new RuntimeException(t);
|
throw new RuntimeException(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The new event thread will call connected
|
|
||||||
// we just start the reconnect thread and
|
|
||||||
// do nothing else
|
|
||||||
|
|
||||||
if (onReconnect != null) {
|
if (onReconnect != null) {
|
||||||
Thread thread = new Thread() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
try {
|
|
||||||
onReconnect.command();
|
onReconnect.command();
|
||||||
} catch (Exception e) {
|
|
||||||
log.warn("Exception running onReconnect command", e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
thread.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
SolrException.log(log, "", e);
|
SolrException.log(log, "", e);
|
||||||
|
|
|
@ -144,7 +144,7 @@ public class SolrZkClient implements Closeable {
|
||||||
+ zkServerAddress, this, zkServerAddress, strat, onReconnect, beforeReconnect);
|
+ zkServerAddress, this, zkServerAddress, strat, onReconnect, beforeReconnect);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
strat.connect(zkServerAddress, zkClientTimeout, connManager,
|
strat.connect(zkServerAddress, zkClientTimeout, wrapWatcher(connManager),
|
||||||
new ZkUpdate() {
|
new ZkUpdate() {
|
||||||
@Override
|
@Override
|
||||||
public void update(SolrZooKeeper zooKeeper) {
|
public void update(SolrZooKeeper zooKeeper) {
|
||||||
|
|
Loading…
Reference in New Issue