NIAD-5467 - Clinical information missing from bundle - #1306
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent corruption of large EHR Extract bundles by adding synchronization around the “merge + uncompress + bundle” step in the COPC message flow, and documenting the fix in the changelog.
Changes:
- Added a synchronized block around
canMergeCompleteBundle/mergeAndBundleMessageinCOPCMessageHandler. - Updated
CHANGELOG.mdwith an Unreleased “Fixed” entry describing the race-condition mitigation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| gp2gp-translator/src/main/java/uk/nhs/adaptors/pss/translator/task/COPCMessageHandler.java | Adds synchronization around merging/uncompressing the complete EHR Extract bundle. |
| CHANGELOG.md | Documents the race-condition fix in the Unreleased section. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
MartinWheelerMT
force-pushed
the
niad-5467-message-merge-issue
branch
from
August 11, 2026 08:49
bb27d90 to
c72aa3c
Compare
Jonopono123
previously approved these changes
Aug 11, 2026
|
Images built and published to ECR using a Build Id of PR-1210-a00f99f |
* Add 'syncronized' to COPC Message handler, due to race condition when attemping to e merge and uncompress large EHR Extract. * Update changelog.
MartinWheelerMT
force-pushed
the
niad-5467-message-merge-issue
branch
from
August 11, 2026 09:12
c72aa3c to
72e532b
Compare
|
Looks good. All 3 mutations in this change were killed.
|
Jonopono123
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Why
This has proven impossible to replicate locally, but we have identified an area where a race condition may occur when multiple threads may attempt to merge and uncompress a large EHR bundle at the same time, causing the bundle to be corrupted.
Type of change
Please delete options that are not relevant.
Checklist: