ramkrish86 commented on a change in pull request #2168:
URL: https://github.com/apache/hbase/pull/2168#discussion_r462720737
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
##########
@@ -412,6 +422,24 @@ protected void doReplaceWriter(Path oldPath, Path newPath,
Writer nextWriter) th
}
}
+ private void closeWriter(Path path, boolean syncCloseCall) throws
IOException {
+ try {
+ TraceUtil.addTimelineAnnotation("closing writer");
+ writer.close();
+ TraceUtil.addTimelineAnnotation("writer closed");
+ } catch (IOException ioe) {
+ int errors = closeErrorCount.incrementAndGet();
+ boolean hasUnflushedEntries = isUnflushedEntries();
+ if (syncCloseCall && (hasUnflushedEntries || (errors >
this.closeErrorsTolerated))) {
Review comment:
That is right. It is not a harm to check again. Am just saying that
since the first sync based close was checking for >= it means either it has
already reached the max count or already greater. And next time when we do
throw the IOE we check it after increment. Reg AsyncWAL i just said if tests
are running with AsyncWAL this code path may never get executed. So should you
go and change the WAL type for test cases to execute this flow?
----------------------------------------------------------------
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]