Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Make TransactionConflictExceptions actually useful #5497

Merged
merged 2 commits into from
Jun 9, 2021

Conversation

Jolyon-S
Copy link
Contributor

@Jolyon-S Jolyon-S commented Jun 9, 2021

Goals (and why):
Conflict exceptions have a load of info that is not really useful to us as-is. Aim is to change that by recording the table - it's not logged anywhere, just accessible so that internally we can use it.

Implementation Description (bullets):
Make TCE and TSCE track the conflicting table.

Testing (What was existing testing like? What have you done to improve it?):
N/A.

Concerns (what feedback would you like?):
Should be safe.

Where should we start reviewing?:
diff

Priority (whenever / two weeks / yesterday):
ASAP.

@changelog-app
Copy link

changelog-app bot commented Jun 9, 2021

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

TransactionConflictException and TransactionSerializableConflictException now track the conflicting table, which can be retrieved via a getter.

Check the box to generate changelog(s)

  • Generate changelog entry

Comment on lines +927 to +933
throw new TransactionSerializableConflictException(
"An uncommitted conflicting read was "
+ "written after our start timestamp for table "
+ tableRef + ". "
+ "This case can cause deadlock and is very likely to be a "
+ "read write conflict.",
tableRef);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spotless apparently.

Copy link
Contributor

@gmaretic gmaretic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🪂

@bulldozer-bot bulldozer-bot bot merged commit 8f789cf into develop Jun 9, 2021
@bulldozer-bot bulldozer-bot bot deleted the make-conflicts-actually-useful branch June 9, 2021 16:36
@svc-autorelease
Copy link
Collaborator

Released 0.350.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants