Repository navigation
Avoid deleting old client sessions - #41548
Conversation
If this is done concurrently, this can load to errors with Hibernate and its optimistic locking Closes keycloak#41427 Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
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.federation.ldap.LDAPGroupMapperTest#test06_addingUserToNewKeycloakGroup |
|
@lbilger - I've pushed a change that will skip the deletion. Can you give this change a try in a local build? I might need some more time to come up with a local test in our test suite ... this might happen also only when an item is no longer in the cache? |
|
@pruivo - please give it a review when you have the time. I can't think of a good way to add a test for this, and I would hope the existing tests should suffice for that. Let's hear what you think of this. Thanks! |
|
@ahus1 it looks fine to me as it seems a waste of queries/operation to remove expired sessions (the remove expired task will take care of it) |
|
Hi @ahus1, some days ago I have deployed a locally-built version of Keycloak including your fix to one of our environments and haven't seen this error there since. So to me it looks like your fix is working. Looking forward to see it merged and released. Thanks a lot for your help! |
|
@ahus1 if it is ok, may you fix it here too? |
|
@pruivo - thanks, I reworked the PR. Please re-review. |
If this is done concurrently, this can load to errors with Hibernate and its optimistic locking
Closes #41427