diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_8_0/4960-delete-expunge-mssql-oracle-10000-resources-error.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_8_0/4960-delete-expunge-mssql-oracle-10000-resources-error.yaml new file mode 100644 index 00000000000..4c1f6664bf5 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_8_0/4960-delete-expunge-mssql-oracle-10000-resources-error.yaml @@ -0,0 +1,6 @@ +--- +type: fix +issue: 4960 +jira: SMILE-5740 +title: "Running a $delete-expunge MSSQL or Oracle with over 10,000 resources results in a error and a stack trace, even though the job ends in status COMPLETE. + This has been fixed." diff --git a/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/coordinator/StepExecutor.java b/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/coordinator/StepExecutor.java index 585e361bab6..385d9b0cb79 100644 --- a/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/coordinator/StepExecutor.java +++ b/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/coordinator/StepExecutor.java @@ -70,10 +70,11 @@ public class StepExecutor { return false; } catch (Exception e) { if (theStepExecutionDetails.hasAssociatedWorkChunk()) { - ourLog.error("Failure executing job {} step {}, marking chunk {} as ERRORED", jobDefinitionId, targetStepId, chunkId, e); + ourLog.info("Temporary problem executing job {} step {}, marking chunk {} as retriable ERRORED", jobDefinitionId, targetStepId, chunkId); WorkChunkErrorEvent parameters = new WorkChunkErrorEvent(chunkId, e.getMessage()); WorkChunkStatusEnum newStatus = myJobPersistence.onWorkChunkError(parameters); if (newStatus == WorkChunkStatusEnum.FAILED) { + ourLog.error("Exhausted retries: Failure executing job {} step {}, marking chunk {} as ERRORED", jobDefinitionId, targetStepId, chunkId, e); return false; } } else {