diff --git a/code/evolve_export/src/org/aspendiscovery/evolve_export/EvolveExportMain.java b/code/evolve_export/src/org/aspendiscovery/evolve_export/EvolveExportMain.java index 8eaadec123..9074c92a8e 100644 --- a/code/evolve_export/src/org/aspendiscovery/evolve_export/EvolveExportMain.java +++ b/code/evolve_export/src/org/aspendiscovery/evolve_export/EvolveExportMain.java @@ -905,7 +905,8 @@ private static int updateRecordsUsingMarcExtract(ArrayList exportedMarcFil logEntry.addNote("Processing file " + curBibFile.getAbsolutePath()); String lastRecordProcessed = ""; - if (hasFullExportFile && curBibFile.equals(fullExportFile) && indexingProfile.getLastChangeProcessed() > 0){ + boolean isFullExportFile = hasFullExportFile && curBibFile.equals(fullExportFile); + if (isFullExportFile && indexingProfile.getLastChangeProcessed() > 0){ logEntry.addNote("Skipping the first " + indexingProfile.getLastChangeProcessed() + " records because they were processed previously see (Last Record ID Processed for the Indexing Profile)."); } int numRecordsRead = 0; @@ -927,7 +928,7 @@ private static int updateRecordsUsingMarcExtract(ArrayList exportedMarcFil } numRecordsRead++; RecordIdentifier recordIdentifier = recordGroupingProcessor.getPrimaryIdentifierFromMarcRecord(curBib, indexingProfile); - if (hasFullExportFile && curBibFile.equals(fullExportFile) && (numRecordsRead < indexingProfile.getLastChangeProcessed())) { + if (isFullExportFile && (numRecordsRead < indexingProfile.getLastChangeProcessed())) { if (recordIdentifier != null) { recordGroupingProcessor.removeExistingRecord(recordIdentifier.getIdentifier()); } @@ -965,7 +966,9 @@ private static int updateRecordsUsingMarcExtract(ArrayList exportedMarcFil //Delete the record since it is suppressed deleteRecord = true; } - indexingProfile.setLastChangeProcessed(numRecordsRead); + if (isFullExportFile){ + indexingProfile.setLastChangeProcessed(numRecordsRead); + } if (deleteRecord && recordIdentifier != null) { RemoveRecordFromWorkResult result = recordGroupingProcessor.removeRecordFromGroupedWork(indexingProfile.getName(), recordIdentifier.getIdentifier()); if (result.reindexWork) { @@ -983,12 +986,14 @@ private static int updateRecordsUsingMarcExtract(ArrayList exportedMarcFil } if (numRecordsRead % 250 == 0) { logEntry.saveResults(); - indexingProfile.updateLastChangeProcessed(dbConn, logEntry); + if (isFullExportFile) { + indexingProfile.updateLastChangeProcessed(dbConn, logEntry); + } } } marcFileStream.close(); - if (hasFullExportFile){ + if (isFullExportFile){ indexingProfile.setLastChangeProcessed(0); indexingProfile.updateLastChangeProcessed(dbConn, logEntry); logEntry.addNote("Updated " + numRecordsRead + " records"); diff --git a/code/symphony_export/src/com/turning_leaf_technologies/symphony/SymphonyExportMain.java b/code/symphony_export/src/com/turning_leaf_technologies/symphony/SymphonyExportMain.java index 346fcbf4d5..1b5f94f525 100644 --- a/code/symphony_export/src/com/turning_leaf_technologies/symphony/SymphonyExportMain.java +++ b/code/symphony_export/src/com/turning_leaf_technologies/symphony/SymphonyExportMain.java @@ -1014,7 +1014,8 @@ private static int updateRecordsUsingMarcExtract(ArrayList exportedMarcFil logEntry.saveResults(); String lastRecordProcessed = ""; - if (hasFullExportFile && curBibFile.equals(fullExportFile) && indexingProfile.getLastChangeProcessed() > 0){ + boolean isFullExportFile = hasFullExportFile && curBibFile.equals(fullExportFile); + if (isFullExportFile && indexingProfile.getLastChangeProcessed() > 0){ logEntry.addNote("Skipping the first " + indexingProfile.getLastChangeProcessed() + " records because they were processed previously see (Last Record ID Processed for the Indexing Profile)."); logEntry.saveResults(); } @@ -1034,7 +1035,7 @@ private static int updateRecordsUsingMarcExtract(ArrayList exportedMarcFil DataField marc245 = curBib.getDataField(245); boolean has245 = marc245 != null; RecordIdentifier recordIdentifier = recordGroupingProcessor.getPrimaryIdentifierFromMarcRecord(curBib, indexingProfile); - if (hasFullExportFile && curBibFile.equals(fullExportFile) && has245 && (numRecordsRead < indexingProfile.getLastChangeProcessed())) { + if (isFullExportFile && has245 && (numRecordsRead < indexingProfile.getLastChangeProcessed())) { //We're skipping this record because we are doing a full export that got paused part way through if (recordIdentifier != null) { recordGroupingProcessor.removeExistingRecord(recordIdentifier.getIdentifier()); @@ -1100,7 +1101,9 @@ private static int updateRecordsUsingMarcExtract(ArrayList exportedMarcFil deleteRecord = true; } lastIdentifier = recordIdentifier; - indexingProfile.setLastChangeProcessed(numRecordsRead); + if (isFullExportFile){ + indexingProfile.setLastChangeProcessed(numRecordsRead); + } if (deleteRecord) { RemoveRecordFromWorkResult result = recordGroupingProcessor.removeRecordFromGroupedWork(indexingProfile.getName(), recordIdentifier.getIdentifier()); if (result.reindexWork) { @@ -1118,12 +1121,14 @@ private static int updateRecordsUsingMarcExtract(ArrayList exportedMarcFil } if (numRecordsRead % 250 == 0) { logEntry.saveResults(); - indexingProfile.updateLastChangeProcessed(dbConn, logEntry); + if (isFullExportFile) { + indexingProfile.updateLastChangeProcessed(dbConn, logEntry); + } } } marcFileStream.close(); - if (hasFullExportFile){ + if (isFullExportFile){ indexingProfile.setLastChangeProcessed(0); indexingProfile.updateLastChangeProcessed(dbConn, logEntry); logEntry.addNote("Updated " + numRecordsRead + " records"); diff --git a/code/web/release_notes/26.10.00/DIS-3002.yaml b/code/web/release_notes/26.10.00/DIS-3002.yaml new file mode 100644 index 0000000000..2898f3d853 --- /dev/null +++ b/code/web/release_notes/26.10.00/DIS-3002.yaml @@ -0,0 +1,12 @@ +Jira: DIS-3002 +Type: Bug +Developer: David Dowling (DD) +ContributingOrg: Prairie Lakes Library System +Sponsor: Prairie Lakes Library System +GroveRelease: 26.10.00 +CommunityRelease: 26.11.00 +Component: Indexing +Description: + - Prevent delta imports from updating Last Changed Processed record offset which would result in an incomplete full import. +NewSettings: +NewPermissions: \ No newline at end of file