-
Hi all @hg-ms, What is the best practice for achieving a "read committed" isolation level for transactions with microstream(without locking/creating copies of objects)? Is there any built-in feature for this? P.S. I came across Reloader.New(persistenceManager);, which can revert the root to its state before a transaction, but it doesn't prevent dirty reads.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, |
Beta Was this translation helpful? Give feedback.
Hi,
We can’t prevent other threads from accessing application objects. Solving concurrency problems like your must be done by the application as Microstream does not own the object graph. From my point of view reentrant read write locks are the best options.
If you’re looking for a simpler solution you may have a look at the class ‘one.microstream.concurrency.XThreads’ that provides a basic approach to handle such concurrency issues in simple applications.