HBASE-29774 incremental backup fails on empty WAL#7762
Open
thomassngdata wants to merge 1 commit into
Open
Conversation
Add handling for WALHeaderEOFException in WALInputFormat with retries similar to other caught exceptions, but supress the exception after retries because empty WAL files should be skipped. IncrementalTableBackupClient.convertWALsToHFiles fails with WALHeaderEOFException "EOF while reading PB WAL magic" when processing an empty WAL file. Because the WALInputFormat reader does not handle the WALHeaderEOFException, unlike the WALEntryStream reader.
DieterDePaepe
left a comment
There was a problem hiding this comment.
Because Thomas (my colleague) is currently unavailable, I've implemented the remarks I made myself in a new PR - see #8327
| int attempt = 0; | ||
| Exception ee = null; | ||
| WALStreamReader reader = null; | ||
| boolean supressException = false; |
| reader = | ||
| WALFactory.createStreamReader(path.getFileSystem(conf), path, conf, startPosition); | ||
| return reader; | ||
| } catch (WALHeaderEOFException wheofe) { |
There was a problem hiding this comment.
I've looked into the potential causes for this exception. The only legitimate case this can occur in normal operation is when using the legacy WAL writer, where there's a minimal time period between opening and flushing the first entry. Other cases are due to crashing Region Servers.
I prefer skipping the retry because:
- it causes the test to run for over a minute.
- in case the empty WAL file originated from a crash, a retry will not solve anything, and just cause a long delay.
- given the only legitimate case for the empty WAL (the legacy WAL writer) simply caused a crash before, it's not a regression to just skip the WAL file instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add handling for WALHeaderEOFException in WALInputFormat with retries similar to other caught exceptions, but supress the exception after retries because empty WAL files should be skipped.
IncrementalTableBackupClient.convertWALsToHFiles fails with WALHeaderEOFException "EOF while reading PB WAL magic" when processing an empty WAL file. Because the WALInputFormat reader does not handle the WALHeaderEOFException, unlike the WALEntryStream reader.