Skip to content

Prevent attempts to delete from federated storage when removing a service account user - #12297

Merged
hmlnarik merged 1 commit into
keycloak:mainfrom
patrickjennings:remove-service-account-user-optimization
Jun 22, 2022
Merged

hmlnarik merged 1 commit into
keycloak:mainfrom
patrickjennings:remove-service-account-user-optimization

Conversation

@patrickjennings

Copy link
Copy Markdown
Contributor

Do not attempt to delete from federated user tables, when deleting a service account linked user.

These are highly contentious tables in our environments. Deleting a service account user is causing deadlocks in this code path.

I don't think it is possible for these service account users to have links to brokers / federate storage providers. But please let me know if there are any use cases where that might be.

closes #12296

@alechenninger

Copy link
Copy Markdown
Contributor

@stianst @hmlnarik can we get some eyes on this one?

@hmlnarik

Copy link
Copy Markdown
Contributor

Thank you for the fix. This needs to wait until #11933 is merged, as there are conflicts between these two PRs.

@hmlnarik hmlnarik added status/hold PR should not be merged. On hold for later. area/storage Storage layer — JPA entities, database schemas, Liquibase migrations, caching team/storage-sig labels Jun 20, 2022
@patrickjennings
patrickjennings force-pushed the remove-service-account-user-optimization branch from 50cbe84 to d6970a0 Compare June 22, 2022 13:48
@hmlnarik
hmlnarik requested a review from mhajas June 22, 2022 13:54
@hmlnarik hmlnarik removed the status/hold PR should not be merged. On hold for later. label Jun 22, 2022
@hmlnarik
hmlnarik removed the request for review from mhajas June 22, 2022 13:54
@hmlnarik
hmlnarik merged commit d048bf2 into keycloak:main Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/storage Storage layer — JPA entities, database schemas, Liquibase migrations, caching

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deadlock when calling removeUser for Service Account Linked Users

3 participants