Apache9 commented on PR #5016:
URL: https://github.com/apache/hbase/pull/5016#issuecomment-1424191961

   I tried to refactoring a bit but the implementation of ProtobufLogReader is 
too complicated. I think we'd better abstract two types of WAL.Reader for 
reading WAL file.
   One is StreamingReader, which is used in most cases, for example, WAL 
splitting, WAL printing, etc, where we only need to read the file once and 
usually for closed WAL files. There is no need to support reset and seek.
   The other is TailingReader, which is used by Replication, where we need to 
support reset and seek, and also we need to tell the upper layer whether we 
need to reset the compress context when calling reseting. The logic will be 
more complicated as we need to consider the requirements for tailing a WAL file 
which is currently being written.
   The refactoring will be a bit big so I do not think we should apply it to 
branch-2.5 and branch-2.4. So let's apply the simple fix here and file another 
issue to implement the big refactoring.
   
   Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to