Apache9 commented on code in PR #5105:
URL: https://github.com/apache/hbase/pull/5105#discussion_r1135772775
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.java:
##########
@@ -292,46 +344,16 @@ private HasNext tryAdvanceEntry() {
return HasNext.RETRY_IMMEDIATELY;
case EOF_AND_RESET:
case EOF_AND_RESET_COMPRESSION:
- if (!beingWritten) {
- // no more entries in this log file, and the file is already closed,
i.e, rolled
- // Before dequeuing, we should always get one more attempt at
reading.
- // This is in case more entries came in after we opened the reader,
and the log is rolled
- // while we were reading. See HBASE-6758
- try {
- reader.resetTo(currentPositionOfEntry, state.resetCompression());
- } catch (IOException e) {
- LOG.warn("Failed to reset reader {} to pos {}, reset
compression={}", currentPath,
- currentPositionOfEntry, state.resetCompression(), e);
- // just leave the state as is, next time we will try to reset it
again, but there is a
- // nasty problem is that, we will still reach here finally and try
reset again to see if
- // the log has been fully replicated, which is redundant, can be
optimized later
- return HasNext.RETRY;
- }
- Pair<WALTailingReader.State, Boolean> p =
readNextEntryAndRecordReaderPosition();
- state = pair.getFirst();
Review Comment:
There is a typo, this maybe the problem why some replication related tests
are unstable...
--
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]