[ 
https://issues.apache.org/jira/browse/PHOENIX-3407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15608785#comment-15608785
 ] 

Josh Elser commented on PHOENIX-3407:
-------------------------------------

bq. Not sure if the HBase API changed at some point, but I could have sworn the 
boolean was for whether or not you wanted to block.

You're not going crazy: HBASE-14465

{code}
   /**
-   * A version of getRowLock(byte[], boolean) to use when a region operation 
has already been
+   *
+   * Get a row lock for the specified row. All locks are reentrant.
+   *
+   * Before calling this function make sure that a region operation has 
already been
    * started (the calling thread has already acquired the region-close-guard 
lock).
+   * @param row The row actions will be performed against
+   * @param readLock is the lock reader or writer. True indicates that a 
non-exlcusive
+   *                 lock is requested
    */
-  protected RowLock getRowLockInternal(byte[] row, boolean waitForLock) throws 
IOException {
+  public RowLock getRowLock(byte[] row, boolean readLock) throws IOException {
+    // Make sure the row is inside of this region before getting the lock for 
it.
+    checkRow(row, "row lock");
+    // create an object to use a a key in the row lock map
{code}

> Wrong type of RowLock acquired by MetaDataEndPointImpl
> ------------------------------------------------------
>
>                 Key: PHOENIX-3407
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3407
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.9.0, 4.8.2
>            Reporter: James Taylor
>            Assignee: James Taylor
>            Priority: Blocker
>
> We're taking a reentrant read lock when we should be taking a write lock in 
> MetaDataEndPointImpl:
> {code}
>         RowLock rowLock = region.getRowLock(key, true);
> {code}
> Not sure if the HBase API changed at some point, but I could have sworn the 
> boolean was for whether or not you wanted to block.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to