Apache9 commented on a change in pull request #3045:
URL: https://github.com/apache/hbase/pull/3045#discussion_r599248320
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALProvider.java
##########
@@ -130,7 +130,12 @@ void init(WALFactory factory, Configuration conf, String
providerId, Abortable s
void addWALActionsListener(WALActionsListener listener);
default WALFileLengthProvider getWALFileLengthProvider() {
- return path -> getWALs().stream().map(w ->
w.getLogFileSizeIfBeingWritten(path))
- .filter(o -> o.isPresent()).findAny().orElse(OptionalLong.empty());
+ return path -> getWALs().stream().map(w -> {
+ try {
+ return w.getLogFileSizeIfBeingWritten(path);
+ } catch (IOException e) {
+ return OptionalLong.empty();
Review comment:
Is this safe? If we could always ignore this exception, let's just do
not declare getLogFileSizeIfBeingWritten as throwing IOException?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]