Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-19797

Operator priority leads to wrong logic in ReplicationSourceWALReader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-beta-2, 2.0.0
    • None
    • None

    Description

      if (e instanceof EOFException ||
              e.getCause() instanceof EOFException && logQueue.size() > 1 && this.eofAutoRecovery)
      

      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.

      Attachments

        1. HBASE-19797.patch
          2 kB
          Duo Zhang

        Issue Links

          Activity

            People

              zhangduo Duo Zhang
              zhangduo Duo Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: