Skip to content

Commit

Permalink
Merge pull request #1084 from NSSuresh11/OLE-9227
Browse files Browse the repository at this point in the history
OLE-9227 : Multiple bib imports are failing intermittently
  • Loading branch information
NSSuresh11 authored Jul 12, 2017
2 parents 7f0ba08 + 4904569 commit 5b009cf
Showing 1 changed file with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -98,16 +100,19 @@ public String processBibAndHoldingsAndItems(String jsonBody) {

List<ItemRecordAndDataMapping> createItemRecordAndDataMappings = (List<ItemRecordAndDataMapping>) exchange.get(OleNGConstants.ITEMS_FOR_CREATE);
List<ItemRecordAndDataMapping> updateItemRecordAndDataMappings = (List<ItemRecordAndDataMapping>) 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);

Expand Down

0 comments on commit 5b009cf

Please sign in to comment.