Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCRUM-4191 Turn off failure limit for paralogy and interaction loads #1582

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void execLoad(BulkLoadFile bulkLoadFile) {

BulkLoadFileHistory history = new BulkLoadFileHistory(interactionData.size());
createHistory(history, bulkLoadFile);
boolean success = runLoad(geneGeneticInteractionService, history, null, interactionData, interactionIdsLoaded);
boolean success = runLoad(geneGeneticInteractionService, history, null, interactionData, interactionIdsLoaded, false);
if (success) {
runCleanup(geneInteractionService, history, "COMBINED", interactionIdsBefore, interactionIdsLoaded, "gene genetic interaction", bulkLoadFile.getMd5Sum());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void execLoad(BulkLoadFile bulkLoadFile) {

BulkLoadFileHistory history = new BulkLoadFileHistory(interactionData.size());
createHistory(history, bulkLoadFile);
boolean success = runLoad(geneMolecularInteractionService, history, null, interactionData, interactionIdsLoaded);
boolean success = runLoad(geneMolecularInteractionService, history, null, interactionData, interactionIdsLoaded, false);
if (success) {
runCleanup(geneInteractionService, history, "COMBINED", interactionIdsBefore, interactionIdsLoaded, "gene molecular interaction", bulkLoadFile.getMd5Sum());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,16 @@ public <E extends AuditedObject, T extends BaseDTO> APIResponse runLoadApi(BaseU
if (dataProviderName != null) {
dataProvider = BackendBulkDataProvider.valueOf(dataProviderName);
}
runLoad(service, history, dataProvider, objectList, idsLoaded);
runLoad(service, history, dataProvider, objectList, idsLoaded, true);
history.finishLoad();
return new LoadHistoryResponce(history);
}

protected <E extends AuditedObject, T extends BaseDTO> boolean runLoad(BaseUpsertServiceInterface<E, T> service, BulkLoadFileHistory history, BackendBulkDataProvider dataProvider, List<T> objectList, List<Long> idsAdded) {
return runLoad(service, history, dataProvider, objectList, idsAdded, true);
}

protected <E extends AuditedObject, T extends BaseDTO> boolean runLoad(BaseUpsertServiceInterface<E, T> service, BulkLoadFileHistory history, BackendBulkDataProvider dataProvider, List<T> objectList, List<Long> idsAdded, Boolean terminateFailing) {
ProcessDisplayHelper ph = new ProcessDisplayHelper();
ph.addDisplayHandler(loadProcessDisplayService);
if (CollectionUtils.isNotEmpty(objectList)) {
Expand All @@ -227,7 +231,7 @@ protected <E extends AuditedObject, T extends BaseDTO> boolean runLoad(BaseUpser
history.incrementFailed();
addException(history, new ObjectUpdateExceptionData(dtoObject, e.getMessage(), e.getStackTrace()));
}
if (history.getErrorRate() > 0.25) {
if (terminateFailing && history.getErrorRate() > 0.25) {
Log.error("Failure Rate > 25% aborting load");
finalSaveHistory(history);
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void execLoad(BulkLoadFile bulkLoadFile) {

BulkLoadFileHistory history = new BulkLoadFileHistory(paralogyData.getData().size());
createHistory(history, bulkLoadFile);
boolean success = runLoad(geneToGeneParalogyService, history, dataProvider, paralogyData.getData(), paralogyIdsLoaded);
boolean success = runLoad(geneToGeneParalogyService, history, dataProvider, paralogyData.getData(), paralogyIdsLoaded, false);

if (success) {
runCleanup(geneToGeneParalogyService, history, fms.getFmsDataSubType(), paralogyPairsBefore, paralogyIdsLoaded, fms.getFmsDataType(), bulkLoadFile.getMd5Sum(), false);
Expand Down
Loading