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

Should not return OptionalLong.empty when the file is active but the write is still null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Replication, wal
    • None

    Description

      I think this could only happen when the FSWAL has not been initialized yet, in this way we should return OptionalLong.of(0) instead of OptionalLong.empty(). As in the replication implenentation, if we can make sure a file is not being written any more, we will dequeue it and go to the next file.

      Although in the current implementation, it should not be a problem and we will only test beingWritten after reading from a WAL file, but since the FSWAL has not been initialized yet, the replication queue of this FSWAL should not be initialized too, so we are safe for now.

      But anyway, this is still a potential bug if we change the implementation in the future, so let's change it OptionalLong.of(0) and let replication framework know that it should wait a bit.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: