[ https://issues.apache.org/jira/browse/HBASE-8458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15271683#comment-15271683 ]
Babar Tareen commented on HBASE-8458: ------------------------------------- I implemented compare and set functionality for apache phoenix based on the exclusive locking and coprocessors (https://github.com/babartareen/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/Indexer.java#L295). With recent change to using ReadWriteLock, a coprocessor will no longer have exclusive control over a row and thus won't be the correct place to intercept a row update. CheckAndPut can not be called from the coprocessor as locks are already acquired as @Esther noted. Where might be a better place to intercept an update and be able to allow/skip it? > Support for batch version of checkAndPut() and checkAndDelete() > --------------------------------------------------------------- > > Key: HBASE-8458 > URL: https://issues.apache.org/jira/browse/HBASE-8458 > Project: HBase > Issue Type: Improvement > Components: Client, regionserver > Affects Versions: 0.95.0 > Reporter: Hari Mankude > > The use case is that the user has multiple threads loading hundreds of keys > into a hbase table. Occasionally there are collisions in the keys being > uploaded by different threads. So for correctness, it is required to do > checkAndPut() instead of a put(). However, doing a checkAndPut() rpc for > every key update is non optimal. It would be good to have a batch version of > checkAndPut() similar to batch put(). The client can partition the keys on > region boundaries. > The jira is NOT looking for any type of cross-row locking or multi-row > atomicity with checkAndPut() > Batch version of checkAndDelete() is a similar requirement. -- This message was sent by Atlassian JIRA (v6.3.4#6332)