I have two questions. I have a multithreaded Java application. What happens when a thread calls getAndLock on a key, and immediately after that another thread calls getAndLock on the same key?
Will the second thread automatically block until the first thread has released the lock? Or, will the function call return with a null CAS value? Or, will it throw an exception?
If the first thread deletes the key (the whole document), what will happen to the second thread?