zhannngchen commented on code in PR #12866: URL: https://github.com/apache/doris/pull/12866#discussion_r990780225
########## be/src/olap/delta_writer.cpp: ########## @@ -295,9 +307,13 @@ Status DeltaWriter::close() { return Status::OLAPInternalError(OLAP_ERR_ALREADY_CANCELLED); } - RETURN_NOT_OK(_flush_memtable_async()); + auto s = _flush_memtable_async(); _mem_table.reset(); - return Status::OK(); + if (OLAP_UNLIKELY(!s.ok())) { Review Comment: You can simply use `return s;`? ########## be/src/olap/delta_writer.cpp: ########## @@ -56,8 +56,6 @@ DeltaWriter::~DeltaWriter() { _garbage_collection(); } - _mem_table.reset(); Review Comment: Why remove 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org