You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Duo Zhang (JIRA)" <ji...@apache.org> on 2018/01/15 07:19:00 UTC

[jira] [Created] (HBASE-19797) Operator priority leads to wrong logic

Duo Zhang created HBASE-19797:
---------------------------------

             Summary: Operator priority leads to wrong logic
                 Key: HBASE-19797
                 URL: https://issues.apache.org/jira/browse/HBASE-19797
             Project: HBase
          Issue Type: Bug
         Environment: {code}
if (e instanceof EOFException ||
        e.getCause() instanceof EOFException && logQueue.size() > 1 && this.eofAutoRecovery)
{code}

https://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html

According to the doc here, && has a higher priority than ||, so we will only check logQueueSize when e.getCause is an EOFException, which is incorrect.
            Reporter: Duo Zhang






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