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
This is a classical concurrent programming issue, not specific to this library.
What I would recommend to you would be to use a version field on your entity and use optimistic locking.
A good idea would be to make the updates transactional as well. If you don't have transaction support on your database, or you want better read performance still, then optimistic locking with a version would be your best bet.
Maybe I am missing something
but in using this library I am creating a sync issue
Thread = T
in the DB:
Class Foo {
int x = 1;
int y = 1;
}
T1 get Foo (x=1, y=1)
T2 get Foo and updates y=2 (x=1, y=2)
T1 update Foo to x=5 (x=5, y=1)
and partial update is not an option because there is not access to the Operation/Path/Value we update
for a server with multiple replica set i need to create a distributed lock in order to avoid sync issue
am i missing any thing?
The text was updated successfully, but these errors were encountered: