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
{{ message }}
This repository was archived by the owner on Jul 6, 2023. It is now read-only.
Create and save using repository entity A on new thread (repo.save(new Entity)).
Fetch entity A using findById to confirm its name is null on main thread.
Using new thread modify name on entity A to some random string.
Now perform on main thread findById and check the name of entity A.
Name parameter is null, it does not contain changes done by other thread.
It works if step 2. is not performed.
I spent some time debugging and discovered that calling close() till it's actually closed on database solves the problem (which makes sense according to example on http://orientdb.com/docs/3.1.x/java/Java-Multi-Threading.html); Debugging starts with OPartitionedDatabasePool class, where it uses PoolData class to understand value of acquireCount int. It looks like this value is increased more times that being decreased. Once for new transaction and once for operation; e.g. save() through AbstractOrientOperations class ( dbf.db() calls aquire method ). Because of that, close() after transaction is completed does nothing. So next fetch is using out-of-date copy.