Attempting to prevent slf4j errors on shutdown.
This commit is contained in:
parent
c3c4a3cde9
commit
cdd44ee41d
1 changed files with 9 additions and 7 deletions
|
@ -149,16 +149,16 @@ public class SolrIndexer implements IndexerIface {
|
||||||
removeDocumentsFromBeforeRebuild( );
|
removeDocumentsFromBeforeRebuild( );
|
||||||
}
|
}
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
if( log != null)
|
if( ! shutdownRequested )
|
||||||
log.debug("could not remove documents from before build, " ,e);
|
log.debug("could not remove documents from before build, " ,e);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
UpdateResponse res = server.commit();
|
UpdateResponse res = server.commit();
|
||||||
log.debug("Response after committing to server: "+ res );
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
if( log != null)
|
if( ! shutdownRequested ){
|
||||||
log.debug("could not commit to solr server, " +
|
log.debug("could not commit to solr server, " +
|
||||||
"this should not be a problem since solr will do autocommit");
|
"this should not be a problem since solr will do autocommit");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
indexing = false;
|
indexing = false;
|
||||||
notifyAll();
|
notifyAll();
|
||||||
|
@ -169,9 +169,11 @@ public class SolrIndexer implements IndexerIface {
|
||||||
server.deleteByQuery("indexedTime:[ * TO " + reindexStart + " ]");
|
server.deleteByQuery("indexedTime:[ * TO " + reindexStart + " ]");
|
||||||
server.commit();
|
server.commit();
|
||||||
} catch (SolrServerException e) {
|
} catch (SolrServerException e) {
|
||||||
log.error("could not delete documents from before rebuild.",e);
|
if( ! shutdownRequested )
|
||||||
|
log.error("could not delete documents from before rebuild.",e);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("could not delete documents from before rebuild.",e);
|
if( ! shutdownRequested )
|
||||||
|
log.error("could not delete documents from before rebuild.",e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue