You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Method io.jmix.core.pessimisticlocking.impl.LockManagerImpl#lock(java.lang.String, java.lang.String) has atomicity problem - between getting value from a cache and putting them to it. I think is need to be used method "putIfAbsent" instead of "get" and "put" for example. In addition, if you look at the problem more deeply, then the question also arises of how to solve this in a clustered environment.
A copy-paste of cuba-platform/cuba#3251
Environment
General issue
Description of the bug
Method io.jmix.core.pessimisticlocking.impl.LockManagerImpl#lock(java.lang.String, java.lang.String) has atomicity problem - between getting value from a cache and putting them to it. I think is need to be used method "putIfAbsent" instead of "get" and "put" for example. In addition, if you look at the problem more deeply, then the question also arises of how to solve this in a clustered environment.
See: https://github.com/Haulmont/jmix-core/blob/10a21a27c5dc9698a88917585029ad1fedf807f7/core/src/main/java/io/jmix/core/pessimisticlocking/impl/LockManagerImpl.java#L127
The text was updated successfully, but these errors were encountered: