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

fail-over case during add
pull/1/head
orbiter 12 years ago
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) {

Loading…
Cancel
Save