Apache9 commented on a change in pull request #3504:
URL: https://github.com/apache/hbase/pull/3504#discussion_r673640065
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java
##########
@@ -274,11 +275,14 @@ private boolean handleEofException(Exception e,
WALEntryBatch batch) {
// since we don't add current log to recovered source queue so it is safe
to remove.
if ((e instanceof EOFException || e.getCause() instanceof EOFException) &&
(source.isRecovered() || queue.size() > 1) && this.eofAutoRecovery) {
- Path head = queue.peek();
+ Path path = queue.peek();
try {
- if (fs.getFileStatus(head).getLen() == 0) {
- // head of the queue is an empty log file
- LOG.warn("Forcing removal of 0 length log in queue: {}", head);
+ if (!fs.exists(path)) {
+ // There is a chance that wal has moved to oldWALs directory, so
look there also.
+ path = AbstractFSWALProvider.getArchivedLogPath(path, conf);
Review comment:
Oh, this is not very stable...
You need to try all the possible path, just like what we have done in
WALEntryStream. So I suggest we move the main logic of
WALEntryStream.getArchivedLog to AbstractFSWALProvider, as a util method, and
we call this method in both places.
--
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]