[Backport axon-5.3.x] [#4802] Adopt a concurrently created config token instead of failing to start - #4907
Merged
Merged
Conversation
…to start The config token row is created on first use, so instances starting together against a fresh token table all raced to insert it. Only one could win, and the losers rethrew the primary-key violation as UnableToRetrieveIdentifierException without ever re-reading the row the winner had just committed, leaving all but one unable to start. Measured at three failures in four. The insert is now wrapped in a JDBC savepoint. On failure it rolls back to the savepoint, re-reads the config token and adopts the winner's identifier, rethrowing with the original cause only when there is genuinely no row to adopt. The savepoint is what makes the re-read legal on databases that abort the whole transaction on a constraint violation, and it is skipped when the connection auto-commits, since a failed insert cannot then poison anything else. Fixes #4802 (cherry picked from commit d973b86)
github-actions
Bot
requested review from
jangalinski,
laura-devriendt-lemon and
smcvb
and removed request for
a team
August 6, 2026 14:01
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.
Description
Backport of #4813 to
axon-5.3.x.