[jira] [Commented] (HBASE-20574) prevRowLock seems not working

2018-05-12 Thread Yi Zheng (JIRA)

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

Yi Zheng commented on HBASE-20574:
--

Hi

In the code above (foreach), the prevRowLock will never have the same row hash 
key with the rowLock,
{code:java}
prevRowLockImpl.getLock() == rowLockContext.readWriteLock.readLock()){code}
this statement will always be false. 

 

and btw, I can't found the log format you provide in the latest code (I 
searched by 'using passed RowLockImpl')

> prevRowLock seems not working
> -
>
> Key: HBASE-20574
> URL: https://issues.apache.org/jira/browse/HBASE-20574
> Project: HBase
>  Issue Type: Improvement
>  Components: regionserver
>Reporter: Yi Zheng
>Priority: Major
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In HRegion.java, getRowLockInternal using prevRowLock to check whether this 
> lock is obtained before, but it may not work as imagine.
> Because this parameter passed as the last lock the thread obtained, and the 
> code always be like this:
> {code:java}
> for (byte[] rows: rowsToLock) {
>     rowLock = getRowLockInternal(row, prevRowLock);
>     if (rowLock != prevRowLock){  
> acquiredRowLocks.add(rowLock);                 
> prevRowLock = rowLock;        
> }
> }{code}
> prevRowLock will never equal to the rowLockContext's lock in 
> getRowLockInternal. I think this parameter is redundant.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HBASE-20574) prevRowLock seems not working

2018-05-11 Thread Yi Zheng (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-20574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yi Zheng updated HBASE-20574:
-
Description: 
In HRegion.java, getRowLockInternal using prevRowLock to check whether this 
lock is obtained before, but it may not work as imagine.

Because this parameter passed as the last lock the thread obtained, and the 
code always be like this:
{code:java}
for (byte[] rows: rowsToLock) {
    rowLock = getRowLockInternal(row, prevRowLock);
    if (rowLock != prevRowLock){  
acquiredRowLocks.add(rowLock);                 
prevRowLock = rowLock;        
}
}{code}
prevRowLock will never equal to the rowLockContext's lock in 
getRowLockInternal. I think this parameter is redundant.

  was:
In HRegion.java, getRowLockInternal using prevRowLock to check whether this 
lock is obtained before, but it may not work as imagine.

Because this parameter passed as the last lock the thread obtained, and the 
code always be like this:

for (byte[] rows: rowsToLock) {

    rowLock = getRowLockInternal(row, prevRowLock);

    if (rowLock != prevRowLock) {        

        acquiredRowLocks.add(rowLock);        

        prevRowLock = rowLock;    

    }

}

prevRowLock will never equal to the rowLockContext's lock in 
getRowLockInternal. I think this parameter is redundant.


> prevRowLock seems not working
> -
>
> Key: HBASE-20574
> URL: https://issues.apache.org/jira/browse/HBASE-20574
> Project: HBase
>  Issue Type: Improvement
>  Components: regionserver
>Reporter: Yi Zheng
>Priority: Major
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In HRegion.java, getRowLockInternal using prevRowLock to check whether this 
> lock is obtained before, but it may not work as imagine.
> Because this parameter passed as the last lock the thread obtained, and the 
> code always be like this:
> {code:java}
> for (byte[] rows: rowsToLock) {
>     rowLock = getRowLockInternal(row, prevRowLock);
>     if (rowLock != prevRowLock){  
> acquiredRowLocks.add(rowLock);                 
> prevRowLock = rowLock;        
> }
> }{code}
> prevRowLock will never equal to the rowLockContext's lock in 
> getRowLockInternal. I think this parameter is redundant.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HBASE-20574) prevRowLock seems not working

2018-05-11 Thread Yi Zheng (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-20574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yi Zheng updated HBASE-20574:
-
Description: 
In HRegion.java, getRowLockInternal using prevRowLock to check whether this 
lock is obtained before, but it may not work as imagine.

Because this parameter passed as the last lock the thread obtained, and the 
code always be like this:

for (byte[] rows: rowsToLock) {

    rowLock = getRowLockInternal(row, prevRowLock);

    if (rowLock != prevRowLock) {        

        acquiredRowLocks.add(rowLock);        

        prevRowLock = rowLock;    

    }

}

prevRowLock will never equal to the rowLockContext's lock in 
getRowLockInternal. I think this parameter is redundant.

  was:
In HRegion.java, getRowLockInternal using prevRowLock to check whether this 
lock is obtained before, but it may not work as imagine.

Because this parameter passed as the last lock the thread obtained, and the 
code always be like this:

for (byte[] rows: rowsToLock) {

    rowLock = getRowLockInternal(row, prevRowLock);

    if (rowLock != prevRowLock) {
        acquiredRowLocks.add(rowLock);
        prevRowLock = rowLock;
    }

}

prevRowLock will never equal to the rowLockContext's lock in 
getRowLockInternal. I think this parameter is redundant.


> prevRowLock seems not working
> -
>
> Key: HBASE-20574
> URL: https://issues.apache.org/jira/browse/HBASE-20574
> Project: HBase
>  Issue Type: Improvement
>  Components: regionserver
>Reporter: Yi Zheng
>Priority: Major
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In HRegion.java, getRowLockInternal using prevRowLock to check whether this 
> lock is obtained before, but it may not work as imagine.
> Because this parameter passed as the last lock the thread obtained, and the 
> code always be like this:
> for (byte[] rows: rowsToLock) {
>     rowLock = getRowLockInternal(row, prevRowLock);
>     if (rowLock != prevRowLock) {        
>         acquiredRowLocks.add(rowLock);        
>         prevRowLock = rowLock;    
>     }
> }
> prevRowLock will never equal to the rowLockContext's lock in 
> getRowLockInternal. I think this parameter is redundant.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (HBASE-20574) prevRowLock seems not working

2018-05-11 Thread Yi Zheng (JIRA)
Yi Zheng created HBASE-20574:


 Summary: prevRowLock seems not working
 Key: HBASE-20574
 URL: https://issues.apache.org/jira/browse/HBASE-20574
 Project: HBase
  Issue Type: Improvement
  Components: regionserver
Reporter: Yi Zheng


In HRegion.java, getRowLockInternal using prevRowLock to check whether this 
lock is obtained before, but it may not work as imagine.

Because this parameter passed as the last lock the thread obtained, and the 
code always be like this:

for (byte[] rows: rowsToLock) {

    rowLock = getRowLockInternal(row, prevRowLock);

    if (rowLock != prevRowLock) {
        acquiredRowLocks.add(rowLock);
        prevRowLock = rowLock;
    }

}

prevRowLock will never equal to the rowLockContext's lock in 
getRowLockInternal. I think this parameter is redundant.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)