Skip to content

$delete-expunge on MSSQL or Oracle with over 10,000 resources results in error and stack trace #4960

Closed
@lukedegruchy

Description

@lukedegruchy

Describe the bug
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.

To Reproduce
Steps to reproduce the behavior:

  1. Configure hapi-fhir with either MSSQL or Oracle
  2. Either import or POST 10,000 resources
  3. Configure hapi-fhir with all options needed to run $delete-expunge (delete expunge enabled, expunge operation enabled, and allow multiple delete enabled)
  4. DELETE: http://localhost:8000/Patient?_expunge=true
  5. Wait for the job to execute the deletes and keep an eye on the logs: See several errors similar to Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 61) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Expected behavior
Since these errors are transitional while the job retries they should not be logged as errors with stack traces

Environment (please complete the following information):

  • HAPI FHIR Version: Master
  • OS: [e.g. iOS]

Additional context
The delete expunge job eventually succeeds and the records are deleted. The errors are just noise during which temporary errors occur

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions