Duo Zhang created HBASE-27653:
---------------------------------
Summary: Should not return OptionalLong.empty when the file is
active but the write is still null
Key: HBASE-27653
URL: https://issues.apache.org/jira/browse/HBASE-27653
Project: HBase
Issue Type: Bug
Components: Replication, wal
Reporter: Duo Zhang
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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)