I've recently started using Couchbase 1.8.1 enterprise version (Java API 1.0) and found that while key is locked other systems/threads fail to read during that lock period. So there is no internal suspension on data retrieval. According to the documentation that is expected behavior.
It looks like if some other system is trying to access locked key it should explicitly suspend execution thread until data get unlocked:
while (isLocked) TimeUnit.MILLISECONDS.sleep(5);
That is perfectly fine unless I am using EJBs where explicit thread management is prohibited.
What native couchbase library means could you suggest or maybe some best practices how to wait on getAndLock if record that being retrieved is already locked?