Skip to content

Commit

Permalink
Upgrade Harvest to no longer check for primary products
Browse files Browse the repository at this point in the history
The concept of skipping secondary products is no longer relevant with the current use of the legacy harvest on EN machines. We will manage the data accordingly to avoid loading products that should not be loaded.

This was causing erroneous skips of products because harvest was tracking secondary members for all bundles/collections encountered in a single run, not accounting for whether or not they are even within the same directory.

resolves #174
  • Loading branch information
jordanpadams committed Dec 2, 2024
1 parent 124dd07 commit e2e7987
Showing 1 changed file with 0 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,35 +281,6 @@ protected boolean passesPreconditions(File product) {
++HarvestSolrStats.numBadFiles;
return false;
} else {
try {
String lid = extractor.getValueFromDoc(Constants.coreXpathsMap.get(
Constants.LOGICAL_ID));
String version = extractor.getValueFromDoc(Constants.coreXpathsMap.get(
Constants.PRODUCT_VERSION));
// Check to see if the product is part of the non-primary member list.
int index = Constants.nonPrimaryMembers.indexOf(new LidVid(lid));
if (index != -1) {
LidVid lidvid = Constants.nonPrimaryMembers.get(index);
if (lidvid.hasVersion()) {
if (lidvid.getVersion().equals(version)) {
log.log(new ToolsLogRecord(ToolsLevel.SKIP,
"Not a primary member.", product));
++HarvestSolrStats.numFilesSkipped;
return false;
}
} else {
log.log(new ToolsLogRecord(ToolsLevel.SKIP,
"Not a primary member.", product));
++HarvestSolrStats.numFilesSkipped;
return false;
}
}
} catch (Exception e) {
log.log(new ToolsLogRecord(ToolsLevel.SEVERE, "Problem extracting "
+ "LIDVID: " + e.getMessage(), product));
++HarvestSolrStats.numBadFiles;
return false;
}
try {
objectType = extractor.getValueFromDoc(Constants.coreXpathsMap.get(
Constants.PRODUCT_CLASS));
Expand Down

0 comments on commit e2e7987

Please sign in to comment.