-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Avoid deleting old client sessions #41548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unreported flaky test detected, please review
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? Lines 411 to 416 in 9322d71
|
Signed-off-by: Alexander Schwartz <[email protected]>
|
@pruivo - thanks, I reworked the PR. Please re-review. |
pruivo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If this is done concurrently, this can load to errors with Hibernate and its optimistic locking
Closes #41427