8000 Use READ COMMITTED transaction isolation for all databases by ahus1 · Pull Request #55792 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Use READ COMMITTED transaction isolation for all databases - #55792

Draft
ahus1 wants to merge 1 commit into
keycloak:mainfrom
ahus1:is-54133-read-committed-all-databases
Draft

ahus1 wants to merge 1 commit into
keycloak:mainfrom
ahus1:is-54133-read-committed-all-databases

Conversation

@ahus1
@ahus1 ahus1 commented Dec 3, 2026
Copy link
Copy Markdown
Member

Closes #54133

Set READ COMMITTED unconditionally via application.properties instead of conditionally through a property mapper gated on the stateless feature. Verify the effective JDBC isolation level at startup and refuse to start if it differs.

Decisions and assumptions:

  • Moved the isolation level from DatabasePropertyMappers to application.properties since it is now a constant for the primary datasource. Secondary/named datasources are unaffected.
  • The binlog format check for MySQL/MariaDB no longer gates on the stateless feature, since READ COMMITTED is now always active.
  • The MSSQL READ_COMMITTED_SNAPSHOT check is kept as a warning (the upgrade to a startup error is tracked separately in Require READ_COMMITTED_SNAPSHOT isolation level on MS SQL Server #55788).
  • The DefaultInfinispanTransactionProviderFactory comment is updated to reflect that READ COMMITTED is now configured for all databases.

Generated with the help of Claude Code.

@ahus1
ahus1 force-pushed the is-54133-read-committed-all-databases branch 3 times, most recently from 3ed8e6b to 469d043 Compare December 3, 2026 16:30
Set the JDBC transaction isolation level to READ COMMITTED unconditionally
via application.properties. MySQL and MariaDB default to REPEATABLE READ,
which causes gap-lock deadlocks and stale-snapshot conflicts; the other
supported databases already default to READ COMMITTED.

Verify the effective isolation level on all databases at startup and refuse
to start if it differs.

Closes keycloak#54133

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
@ahus1
ahus1 force-pushed the is-54133-read-committed-all-databases branch from 469d043 to c59399a Compare December 3, 2026 16:31
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.

Use READ COMMITTED JDBC isolation for MariaDB and MySQL in all configurations

1 participant

0