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
Use cache.compute() method to improve the replace retry loop #29073
Comments
Closes keycloak#29073 Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
Closes keycloak#29073 Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
Closes keycloak#29073 Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
Closes keycloak#29073 Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
Closes #29073 Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
I like to backport this change to KC24 as it IMHO fixed #28466. As this is a breaking change and it would @pruivo - please create a first backport which would allow us in a two-step approach to get all necessary classes in a first patch release. Once this is merged and released, there would be a second PR to actually use these classes, IMHO that would be the changes to InfinispanChangelogBasedTransaction. |
Follow-up-on keycloak#29073 Signed-off-by: Michal Hajas <mhajas@redhat.com>
Follow-up-on keycloak#29073 Signed-off-by: Michal Hajas <mhajas@redhat.com>
Follow-up-on keycloak#29073 Signed-off-by: Michal Hajas <mhajas@redhat.com>
Follow-up-on keycloak#29073 Signed-off-by: Michal Hajas <mhajas@redhat.com>
Follow-up-on #29073 Signed-off-by: Michal Hajas <mhajas@redhat.com>
This commit only adds the ReplaceFunction to it can be backwards compatible. Closes keycloak#29073 Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
Pull Request to KC24 available here: #29229 |
This commit only adds the ReplaceFunction to it can be backwards compatible. Closes #29073 Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
On hold for 24.0.4 to be released. Then the second half will be backported. |
@pruivo - KC 24.0.4 has been released today. Please provide the second part of the backport. Thanks! |
Final commit to enable the new function. Closes keycloak#29073 Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
second part here: #29378 |
Final commit to enable the new function. Closes #29073 Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
Description
The
Map.replace()
returns a boolean to signal if the replaced succeed or not. This is inefficient because KC needs to perform a read operation to fetch the value again.Using the
compute()
method, we can retrieve the most recent version and we can do the replacement based on version instead of equality.Discussion / Motivation
This should fix the root cause for the symptoms observed in #28466
The text was updated successfully, but these errors were encountered: