Multiple servers use the same database,when they access the same data by optimistic locks.Sever A,server B get the data of version 1,and they commit at the same time with the version 2. Do optimistic locks work for multiple applications?
Do optimistic locks work for multiple applications
439 Views Asked by jr1990 At
1
There are 1 best solutions below
Related Questions in LOCKS
- Gap locks using InnoDB
- Spring JPA Concurrency Transactional or Lock
- Why is the lock on the key not held?
- How to correctly set the lock in MySQL?
- Using JdbcLockRegistry from different threads to lock and unlock based on lockKey
- Thread counter Synchronization issue
- Using custom locks to insert rows safely
- Distributed Locking service in AWS
- Allow concurrent executions of two methods but not both at the same time
- Postgres locks monitoring with relname(table name)
- read write lock with retry in python
- Why use defer lock with unique lock
- synchronized this vs field in Java
- Julia Lock with SharedArrays
- Trying to keep clean the concurrent dictionary with nested locks
Related Questions in OPTIMISTIC
- SQL Server opportunistic locking
- Optimistic service validation vs Pessimistic validation
- Visual replication issue when moving tasks between columns using Angular and Firebase
- Django form update optimistic locking, version based
- Type error when using onMutate in react query (Optimistic Updates)
- prisma:Optimistic Concurrency Control Use UpdateMany Has Problems
- Optimistic Locking in Rails not allowing record to be modified in the console
- Can a optimistic lock give a deadlock?
- Apollo - Using optimisticResponse for dates
- Apollo Cache - Partially read from cache?
- optimistic update for like/dislike and like count with react native, redux
- React: Unique keys and optimistic updating
- JPA optimistic lock with SQLServer TIMESTAMP
- Is this a good first project for my low Java skill? *Age Detector*
- Do optimistic locks work for multiple applications
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If you're actually using optimistic locks, of course they work for multiple applications. That's the whole point of optimistic locks - you don't really need them in a single application.
But they need to be optimistic locks, not just "let's hope it doesn't break". That means that an update of the row must always result in a new version number. When A and B try to do the update, the first that actually goes through will have the old version incremented, which means the other will no longer have a matching version, and will get an optimistic concurrency fail.