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

DMP-4653 Fixing courtroom name unique constraint violation #2536

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

davet1985
Copy link
Contributor

@davet1985 davet1985 commented Feb 3, 2025

JIRA link (if applicable)

https://tools.hmcts.net/jira/browse/DMP-4653

Change description

Primarily fixing courtroom name unique constraint violations.

  • plus hearing, case and judge constraint violations
  • increasing the attempts made by the Retryable annotation, up to 10 attempts retying every 50ms, spending a total of 500ms before failing
  • most of these are used by requests via the SOAP service and if a failure did happen it would be retried by the external system
  • creating a new transaction so that the retried method has the latest data, before it was stuck with a stable view when retrying and never doing anything
  • adding javadoc for all methods in RetrieveCoreObjectService to help explain how they are used
  • deprecating some methods as they are only used in tests
  • removing the Retryable annotation from some methods because it's not necessary

The impact of this change, specifically the new transactions, is that it's possible that courtrooms, cases, hearings and judges could be persisted in the database when the whole request fails. I don't see this as an issue, since it's likely the request would be retried and the likelihood of this happening and the request failing is tiny, therefore any data persisted would be minimal.

These items are central to many of the requests DARTS receives and need to persisted quickly to allow other transactions to be aware of them.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[ ] No

- plus hearing, case and judge constraint violations
- increasing the attempts made by the Retryable annotation, up to 10 attempts retying every 50ms, spending a total of 500ms before failing
- most of these are used by requests via the SOAP service and if a failure did happen it would be retried by the external system
- creating a new transaction so that the retried method has the latest data, before it was stuck with a stable view when retrying and never doing anything
- adding javadoc for all methods in `RetrieveCoreObjectService` to help explain how they are used
- deprecating some methods as they are only used in tests
- removing the Retryable annotation from some methods because it's not necessary
- removing `Transactional` from test class
- using hibernate sessions
@davet1985 davet1985 merged commit d3abf51 into master Feb 5, 2025
10 checks passed
@davet1985 davet1985 deleted the DMP-4653 branch February 5, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants