Closed kmbarton423 closed 2 years ago
Receive the following after the fix:
Status 409 Conflict
{ "resourceType": "OperationOutcome", "id": "ac-11-0-3-e8b4cd0e-8ba2-494c-af1d-b34a53d711c0", "issue": [ { "severity": "fatal", "code": "conflict", "details": { "text": "Encountered version id mismatch while inserting Resource" }, "expression": [ "<empty>", "Bundle.entry[1]" ] } ] }
Running IBM FHIR Server 4.10.0 with CPG and CQF operations. Executed $submit-data operation for an existing MeasureReport:
POST {{local1}}{{context1}}/Measure/$submit-data
(see attached requestBody.txt)
Status 200 received yet operation fails:
Logs indicate "PSQLException: ERROR: Concurrent update - mismatch of version in JSON" (see attached out.log)
The core issue is related to MeasureSubmitDataOperation.java on line 80. The switch between PUT/POST depends on a VERSION. On the second submission of the same data element, the version is passed into the persistence layer, and the persistence layer sees a violation of the stored version (v1) violates the incoming version (v1).
Options, remove the version in that code, or use ifNoneMatch and handle the response.
Additional context