Repository navigation
Disable Hibernate second-level cache to avoid SimpleTimestamper busy loop - #55302
Merged
ahus1 merged 1 commit intoNov 19, 2026
Merged
Conversation
ahus1
force-pushed
the
is-55297-disable-hibernate-second-level-cache
branch
from
November 18, 2026 10:21
e74113a to
99f4120
Compare
…loop Closes keycloak#55297 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
ahus1
force-pushed
the
is-55297-disable-hibernate-second-level-cache
branch
from
November 18, 2026 11:15
99f4120 to
ad22e5f
Compare
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the change to disable Hibernate caching by default.
No open issues 🎉
What changed in this PR
Disables Hibernate caching by default to avoid the SimpleTimestamper busy loop after a system-clock rollback reported in #55297. Keycloak’s separate Infinispan caching remains unchanged.
Changes:
- Disables Hibernate’s second-level and query caches through Quarkus configuration.
- Adds an upgrade note explaining the impact and how custom extensions can re-enable caching at build time.
| File | Description |
|---|---|
quarkus/runtime/src/main/resources/application.properties |
Disables Hibernate caching and documents the clock-rollback workaround. |
docs/documentation/upgrading/topics/changes/changes-27_0_0.adoc |
Explains the new default and the configuration and rebuild steps for extensions that need caching. |
Review effort: Balanced
ahus1
marked this pull request as ready for review
November 18, 2026 12:19
ahus1
enabled auto-merge (squash)
November 18, 2026 12:19
shawkins
approved these changes
Nov 19, 2026
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 #55297
Keycloak caches in Infinispan and uses no Hibernate entity, collection or query caches, so disabling them removes the
SimpleTimestampercode path without a functional loss.Decisions and assumptions:
quarkus.hibernate-orm.second-level-caching-enabled=falsedisables both second-level and query cache, so Quarkus selectsNoCachingRegionFactoryinstead ofJCacheRegionFactory. I verified this on a local distribution via the loaded classes.SimpleTimestamper.next()spinning when the clock moves backwards) remains upstream (https://hibernate.atlassian.net/browse/HHH-13664, open since 2019); this only avoids it for Keycloak.