Apache9 commented on code in PR #6266:
URL: https://github.com/apache/hbase/pull/6266#discussion_r2012282293
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractRecoveredEditsOutputSink.java:
##########
@@ -73,33 +73,27 @@ protected RecoveredEditsWriter
createRecoveredEditsWriter(TableName tableName, b
return new RecoveredEditsWriter(region, regionEditsPath, w, seqId);
}
- protected Path closeRecoveredEditsWriter(RecoveredEditsWriter editsWriter,
+ /**
+ * abortRecoveredEditsWriter closes the editsWriter, but does not rename and
finalize the
+ * recovered edits WAL files. Please see HBASE-28569.
+ */
+ protected void abortRecoveredEditsWriter(RecoveredEditsWriter editsWriter,
List<IOException> thrown) throws IOException {
- try {
- editsWriter.writer.close();
- } catch (IOException ioe) {
- final String errorMsg = "Could not close recovered edits at " +
editsWriter.path;
- LOG.error(errorMsg, ioe);
- updateStatusWithMsg(errorMsg);
- thrown.add(ioe);
+ closeRecoveredEditsWriter(editsWriter, thrown);
+ if (editsWriter.editsWritten == 0) {
+ // just remove the empty recovered.edits file
+ removeRecoveredEditsFile(editsWriter);
+ }
Review Comment:
I think we can always delete it.
--
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]