[
https://issues.apache.org/jira/browse/HBASE-17131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15682241#comment-15682241
]
Ted Yu edited comment on HBASE-17131 at 11/21/16 2:16 AM:
----------------------------------------------------------
Reproduced the following failure with / without branch-1 patch:
{code}
testClientScannerIsResetWhenScanThrowsIOException(org.apache.hadoop.hbase.client.TestFromClientSide)
Time elapsed: 1.667 sec <<< FAILURE!
java.lang.AssertionError: expected:<17576> but was:<0>
at
org.apache.hadoop.hbase.client.TestFromClientSide.testClientScannerIsResetWhenScanThrowsIOException(TestFromClientSide.java:702)
{code}
Logged HBASE-17137.
was (Author: [email protected]):
Reproduced the following failure with branch-1 patch:
{code}
testClientScannerIsResetWhenScanThrowsIOException(org.apache.hadoop.hbase.client.TestFromClientSide)
Time elapsed: 1.667 sec <<< FAILURE!
java.lang.AssertionError: expected:<17576> but was:<0>
at
org.apache.hadoop.hbase.client.TestFromClientSide.testClientScannerIsResetWhenScanThrowsIOException(TestFromClientSide.java:702)
{code}
Please investigate.
> Avoid livelock caused by HRegion#processRowsWithLocks
> -----------------------------------------------------
>
> Key: HBASE-17131
> URL: https://issues.apache.org/jira/browse/HBASE-17131
> Project: HBase
> Issue Type: Bug
> Affects Versions: 2.0.0, 1.4.0, 1.3.1
> Reporter: ChiaPing Tsai
> Assignee: ChiaPing Tsai
> Fix For: 2.0.0, 1.4.0, 1.3.1
>
> Attachments: HBASE-17131.branch-1.v0.patch, HBASE-17131.v0.patch
>
>
> {code:title=HRegion.java|borderStyle=solid}
> try {
> // STEP 2. Acquire the row lock(s)
> acquiredRowLocks = new ArrayList<RowLock>(rowsToLock.size());
> for (byte[] row : rowsToLock) {
> // Attempt to lock all involved rows, throw if any lock times out
> // use a writer lock for mixed reads and writes
> acquiredRowLocks.add(getRowLockInternal(row, false));
> }
> // STEP 3. Region lock
> lock(this.updatesLock.readLock(), acquiredRowLocks.size() == 0 ? 1 :
> acquiredRowLocks.size());
> locked = true;
> boolean success = false;
> long now = EnvironmentEdgeManager.currentTime();
> try {
> {code}
> We should lock all involved rows in the second try-finally. Otherwise, we
> won’t release the previous locks if any subsequent lock times out.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)