1
0
mirror of https://github.com/yacy/yacy_search_server.git synced 2025-07-19 08:44:42 -04:00

better handling of time-out at solrj in case that a commit is done in a

fail-over case during add
This commit is contained in:
orbiter
2013-07-09 11:01:37 +02:00
parent b4677d1cad
commit f4f6551c66

@ -212,6 +212,11 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen
Log.logException(ee);
try {
this.server.commit();
} catch (Throwable eee) {
Log.logException(eee);
// a time-out may occur here
}
try {
this.server.add(solrdoc, -1);
} catch (Throwable eee) {
Log.logException(eee);
@ -240,7 +245,13 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen
this.server.deleteById(ids);
} catch (SolrServerException e1) {
Log.logException(e1);
}
}
try {
this.server.commit();
} catch (Throwable eee) {
Log.logException(eee);
// a time-out may occur here
}
try {
this.server.add(solrdocs, -1);
} catch (Throwable ee) {