Apache9 commented on code in PR #6266:
URL: https://github.com/apache/hbase/pull/6266#discussion_r1993585286


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/RecoveredEditsOutputSink.java:
##########
@@ -89,20 +89,17 @@ private RecoveredEditsWriter 
getRecoveredEditsWriter(TableName tableName, byte[]
 
   @Override
   public List<Path> close() throws IOException {
-    boolean isSuccessful = true;
-    try {
-      isSuccessful = finishWriterThreads();
-    } finally {
-      isSuccessful &= closeWriters();
-    }
+    boolean isSuccessful;
+    isSuccessful = finishWriterThreads();

Review Comment:
   I think finishWriterThreads will not close the writers, so we still need to 
close them even if finishWriterThreads returns false or throws exception.
   
   So I think we should introduce something like abortWriters, if 
finishWriterThreads returns false or throws exception, we just close the 
writer, without renaming the wal file.
   
   Thanks.



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

Reply via email to