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( );
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
if( log != null)
|
||||
if( ! shutdownRequested )
|
||||
log.debug("could not remove documents from before build, " ,e);
|
||||
}
|
||||
try {
|
||||
UpdateResponse res = server.commit();
|
||||
log.debug("Response after committing to server: "+ res );
|
||||
UpdateResponse res = server.commit();
|
||||
} catch (Throwable e) {
|
||||
if( log != null)
|
||||
if( ! shutdownRequested ){
|
||||
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;
|
||||
notifyAll();
|
||||
|
@ -169,9 +169,11 @@ public class SolrIndexer implements IndexerIface {
|
|||
server.deleteByQuery("indexedTime:[ * TO " + reindexStart + " ]");
|
||||
server.commit();
|
||||
} 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) {
|
||||
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