Reputation: 7800
I understand that HBase uses a Multi-version concurrency control, and the documentation for CheckAndMutate explains that it is an atomic operation. I am not sure what that means?
Let's say I have:
checkAndMutate
) if the value is 5If the read is included under the same atomic umbrella then only one of the workers would succeed. If the read is not included under the atomic umbrella then both could succeed.
Upvotes: 2
Views: 283
Reputation: 1403
The way checkAndMutate
works in HBase is that a write lock is taken on the row that needs to be updated BEFORE the read in the checkAndMutate
operation. So, yes, the read is also included in the atomicity guarantee and only one worker will succeed in the scenario that you have posed.
Upvotes: 3