Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Deleting a live former coordinator’s row can temporarily select the smaller partition as the winner, requiring prompt republication and a live-partition regression test rather than reliance on periodic refresh.
1 open issue
What changed in this PR
This PR addresses #55236 by removing a departed coordinator’s JDBC_PING2 row, allowing surviving nodes to recover readiness without waiting for that row to become stale.
Changes:
- Deletes the previous coordinator’s row when the local node is coordinator and the previous coordinator is absent from the new view.
- Adds a regression test verifying removal while preserving an unrelated coordinator’s row.
- Adds a separate design draft for consolidating database-backed session handling.
| File | Description |
|---|---|
model/infinispan/src/test/java/org/keycloak/jgroups/protocol/JdbcPing2Test.java |
Tests departed-coordinator cleanup and preservation of unrelated rows. |
model/infinispan/src/main/java/org/keycloak/jgroups/protocol/KEYCLOAK_JDBC_PING2.java |
Removes the departed coordinator’s database row during view changes. |
model/infinispan/session-storage-refactoring.md |
Documents a separate session-storage proposal and its transaction, isolation, and validation requirements. |
Review effort: Balanced
Closes keycloak#55236 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
ahus1
force-pushed
the
is-55236-jdbc-ping-remove-left-coordinator
branch
from
November 16, 2026 20:13
5b3b57a to
f6e31fa
Compare
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.model.infinispan.EmbeddedInfinispanSplitBrainTest#testRevokedTokensReloadedOnMergeEventKeycloak CI - Store Model Tests |
…again Instead of deleting the row of the previous coordinator, ignore its row in the split-brain decision until the row is updated after it left the view. Closes keycloak#55236 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
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.
Closes #55236
When the coordinator of a small cluster dies, its row stays in the table with
coord = trueuntil it is stale, and with the lower address it wins the split-brain decision against the survivor. Ignoring that row lets the survivor stay ready.Decisions and assumptions
coord = truerow of such a member until the row has been updated after it left. Only a member itself writes its own coordinator row, so an updated row shows that it is alive again, and the usual tie-break applies (the older node with the lower address wins).last_updatewith the local clock, as the staleness check already does. It relies on synchronized clocks, and the resolution is one second: a live member that rewrites its row within the same second as it left is counted again with its next write.