From 4904569b6793441c94f850e8ad2f76009a1a33d9 Mon Sep 17 00:00:00 2001 From: NSSuresh11 Date: Wed, 12 Jul 2017 13:29:06 +0530 Subject: [PATCH] OLE-9227 : Multiple bib imports are failing intermittently --- .../processor/OleDsNgOverlayProcessor.java | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/ole-docstore/ole-docstore-webapp/src/main/java/org/kuali/ole/dsng/rest/processor/OleDsNgOverlayProcessor.java b/ole-docstore/ole-docstore-webapp/src/main/java/org/kuali/ole/dsng/rest/processor/OleDsNgOverlayProcessor.java index 5a4a641fdb..07cbfade53 100644 --- a/ole-docstore/ole-docstore-webapp/src/main/java/org/kuali/ole/dsng/rest/processor/OleDsNgOverlayProcessor.java +++ b/ole-docstore/ole-docstore-webapp/src/main/java/org/kuali/ole/dsng/rest/processor/OleDsNgOverlayProcessor.java @@ -3,6 +3,7 @@ import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.map.HashedMap; import org.apache.commons.lang3.StringUtils; +import org.apache.log4j.Logger; import org.apache.solr.common.SolrInputDocument; import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.map.JsonMappingException; @@ -37,6 +38,7 @@ * Created by SheikS on 12/8/2015. */ public class OleDsNgOverlayProcessor extends OleDsNgOverlayProcessorHelper implements DocstoreConstants { + private static final Logger LOG = Logger.getLogger(OleDsNgOverlayProcessor.class); @Autowired OleDsNGMemorizeService oleDsNGMemorizeService; @@ -98,16 +100,19 @@ public String processBibAndHoldingsAndItems(String jsonBody) { List createItemRecordAndDataMappings = (List) exchange.get(OleNGConstants.ITEMS_FOR_CREATE); List updateItemRecordAndDataMappings = (List) exchange.get(OleNGConstants.ITEMS_FOR_UPDATE); - synchronized (this) { - processBib(solrInputDocumentMap, exchange, bibJSONDataObject, ops, bibRecord); + LOG.info("processBib started"); + processBib(solrInputDocumentMap, exchange, bibJSONDataObject, ops, bibRecord); + LOG.info("processBib completed"); + LOG.info("processHoldings started"); + processHoldings(solrInputDocumentMap, exchange, bibJSONDataObject, ops, holdingsForUpdateOrCreate); + LOG.info("processHoldings completed"); + LOG.info("processEHoldings started"); + processEHoldings(solrInputDocumentMap, exchange, bibJSONDataObject, ops); + LOG.info("processEHoldings completed"); + LOG.info("processItems started"); + processItems(solrInputDocumentMap, exchange, bibJSONDataObject, ops); + LOG.info("processItems completed"); - processHoldings(solrInputDocumentMap, exchange, bibJSONDataObject, ops, holdingsForUpdateOrCreate); - - processEHoldings(solrInputDocumentMap, exchange, bibJSONDataObject, ops); - - processItems(solrInputDocumentMap, exchange, bibJSONDataObject, ops); - - } bibRecord = (BibRecord) exchange.get(OleNGConstants.BIB); buildBibResponses(bibResponse, bibRecord, exchange, operationsList);