shahrs87 commented on a change in pull request #3277:
URL: https://github.com/apache/hbase/pull/3277#discussion_r635260123



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java
##########
@@ -1369,13 +1369,17 @@ public LogRecoveredEditsOutputSink(PipelineController 
controller, EntryBuffers e
      */
     @Override
     public List<Path> finishWritingAndClose() throws IOException {
-      boolean isSuccessful = false;
-      List<Path> result = null;
+      boolean isSuccessful;
+      List<Path> result;
+      List<IOException> thrown;
       try {
         isSuccessful = finishWriting(false);
       } finally {
-        result = close();

Review comment:
       Before this change, in case of exception we are closing the files first 
and then closing the writers. This will create corrupt wals since the file is 
closed while the writer is still writing to these files. We might miss some 
data and close will append the trailer to them.




-- 
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]


Reply via email to