Repository navigation
Replies: 1 comment
|
Hi @vramik - thanks for starting this discussion. Here some thoughts, some are not answers, yet:
You have been asking about Looking at the Regarding the AuthSession implementations: Let me recap what I know about the relation of I'd may even go so far to advocate for pessimistically locking the root session to make a concurrent interaction in another tab wait for the other tab to complete. When doing this, I'd be a bit hesitant, as we're also locking user sessions already. If there are different areas of the code that lock those two objects pessimistically in a different order, this could lead to deadlocks. Keeping the optimistic locking would lead to optimistic locking exceptions. So let's be cautious here. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are few interfaces in jpa map store
JpaRootEntity- interface should represent an entity with jsonb colunm. There are methods for getting and updating entityVersion. Also method for obtaining currentSchemaVersionJpaRootVersionedEntity- extendsJpaRootEntityand adds optimistic locking feature for the entityJpaChildEntity- should represent child entity (hasR getParent()method) and also serves in bothJpaOptimisticLockingListenerandJpaEntityVersionListener.With implementation of user jpa store there has been added few entities which somewhat collides in terms of above.
JpaUserConsentEntity,JpaUserFederatedIdentityEntityimplementsJpaChildEntity(so it affects locking of its parent entityJpaUserEntitywithinJpaOptimisticLockingListener) and also contains jsonb column (which is not taken into an account whenJpaEntityVersionListenertries to update the entity version).Also with auth session implementation:
JpaAuthenticationSessionEntityis technically child entity ofJpaRootAuthenticationSessionEntitybut doesn't implementJpaChildEntity, so nothing happens withinJpaOptimisticLockingListener.Any thouths?
Should we e.g. create new interface for entities with jsonb column and leave parent-child relationship as is? Or can we mark some entities as both parent and child?
All reactions