Skip to content

Fix stateless cluster and db migrations race - #51406

Merged
ahus1 merged 1 commit into
keycloak:release/26.7from
slaskawi:backport-51357-26.7
Aug 6, 2026
Merged

Fix stateless cluster and db migrations race#51406
ahus1 merged 1 commit into
keycloak:release/26.7from
slaskawi:backport-51357-26.7

Conversation

@slaskawi

@slaskawi slaskawi commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Closes #51154

Signed-off-by: Sebastian Łaskawiec sebastian.laskawiec@defenseunicorns.com
(cherry picked from commit f0e9bef)

Closes keycloak#51154

Signed-off-by: Sebastian Łaskawiec <sebastian.laskawiec@defenseunicorns.com>
(cherry picked from commit f0e9bef)

Copilot AI 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.

Pull request overview

Fixes stateless startup during database migrations by avoiding factory state initialized only in postInit().

Changes:

  • Retrieves node information and marshaller from the current session.
  • Adds a regression test for cluster events before postInit().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
DatabaseAwareClusterProviderFactory.java Removes lifecycle-dependent shared state.
DatabaseAwareClusterProviderFactoryTest.java Tests early provider creation and notification.

@ahus1
ahus1 merged commit 3de2f91 into keycloak:release/26.7 Aug 6, 2026
85 checks passed
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.

3 participants