Skip to content

[Backport axon-5.3.x] [#4802] Adopt a concurrently created config token instead of failing to start - #4907

Merged
smcvb merged 1 commit into
axon-5.3.xfrom
backport-4813-to-axon-5.3.x
Aug 6, 2026
Merged

[Backport axon-5.3.x] [#4802] Adopt a concurrently created config token instead of failing to start#4907
smcvb merged 1 commit into
axon-5.3.xfrom
backport-4813-to-axon-5.3.x

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

Backport of #4813 to axon-5.3.x.

…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
github-actions Bot requested a review from a team as a code owner August 6, 2026 14:01
@github-actions github-actions Bot added the Type: Port Use to refer to an issue or pull request that ports logic from one branch to another. label Aug 6, 2026
@github-actions
github-actions Bot requested review from jangalinski, laura-devriendt-lemon and smcvb and removed request for a team August 6, 2026 14:01
@github-actions github-actions Bot added the Type: Port Use to refer to an issue or pull request that ports logic from one branch to another. label Aug 6, 2026
@smcvb smcvb added Type: Bug Use to signal issues that describe a bug within the system. Priority 1: Must Highest priority. A release cannot be made if this issue isn’t resolved. labels Aug 6, 2026
@smcvb smcvb added this to the Release 5.3.1 milestone Aug 6, 2026

@smcvb smcvb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me 👍

@smcvb
smcvb enabled auto-merge August 6, 2026 14:10
@smcvb
smcvb merged commit 9c06345 into axon-5.3.x Aug 6, 2026
9 checks passed
@smcvb
smcvb deleted the backport-4813-to-axon-5.3.x branch August 6, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority 1: Must Highest priority. A release cannot be made if this issue isn’t resolved. Type: Bug Use to signal issues that describe a bug within the system. Type: Port Use to refer to an issue or pull request that ports logic from one branch to another.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants