zzzxl1993 commented on code in PR #44084:
URL: https://github.com/apache/doris/pull/44084#discussion_r1845339847
##########
be/src/olap/rowset/segment_v2/inverted_index_file_writer.cpp:
##########
@@ -268,38 +270,39 @@ Status InvertedIndexFileWriter::write_v1() {
write_header_and_data_v1(output.get(), sorted_files, directory,
header_length,
header_file_count);
- // Close and clean up
- finalize_output_dir(out_dir);
-
// Collect file information
auto compound_file_size = output->getFilePointer() - start;
- output->close();
total_size += compound_file_size;
add_index_info(index_id, index_suffix, compound_file_size);
-
} catch (CLuceneError& err) {
- finalize_output_dir(out_dir);
- if (output != nullptr) {
- output->close();
- output.reset();
- }
+ eptr = std::current_exception();
auto index_path = InvertedIndexDescriptor::get_index_file_path_v1(
_index_path_prefix, index_id, index_suffix);
- LOG(ERROR) << "CLuceneError occur when write_v1 idx file " <<
index_path
- << " error msg: " << err.what();
-
- return Status::Error<ErrorCode::INVERTED_INDEX_CLUCENE_ERROR>(
- "CLuceneError occur when write_v1 idx file: {}, error msg:
{}", index_path,
- err.what());
+ err_msg = "CLuceneError occur when write_v1 idx file " +
index_path +
+ " error msg: " + err.what();
}
}
+
+ // Close and clean up
+ finalize_output_dir(out_dir);
Review Comment:
_CLDECDELETE会置空,finalize_output_dir参数是值拷贝,里面的指针置空并不能影响外面
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]