You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Yi Zheng (JIRA)" <ji...@apache.org> on 2018/05/12 05:34:00 UTC
[jira] [Updated] (HBASE-20574) prevRowLock seems not working
[ 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)