airborne12 commented on code in PR #46508:
URL: https://github.com/apache/doris/pull/46508#discussion_r1905094658
##########
be/src/olap/compaction.cpp:
##########
@@ -858,72 +858,86 @@ Status
Compaction::construct_output_rowset_writer(RowsetWriterContext& ctx, bool
return false;
}
for (auto i = 0; i < rowset->num_segments(); i++) {
- auto segment_file =
rowset->segment_file_path(i);
- io::Path segment_path(segment_file);
- auto inverted_index_file_reader =
-
std::make_unique<InvertedIndexFileReader>(
- fs, segment_path.parent_path(),
- segment_path.filename(),
- _cur_tablet_schema
-
->get_inverted_index_storage_format());
- bool open_idx_file_cache = false;
- auto st = inverted_index_file_reader->init(
-
config::inverted_index_read_buffer_size,
- open_idx_file_cache);
- if (!st.ok()) {
- LOG(WARNING) << "init index "
- <<
inverted_index_file_reader->get_index_file_path(
- index_meta)
- << " error:" << st;
- return false;
- }
-
- bool exists = false;
- if (!inverted_index_file_reader
- ->index_file_exist(index_meta,
&exists)
- .ok()) {
- LOG(ERROR) <<
inverted_index_file_reader->get_index_file_path(
- index_meta)
- << " fs->exists error";
- return false;
- }
-
- if (!exists) {
+ std::string index_file_path;
Review Comment:
if clucene error throw in file_reader->init, index_file_path will be empty
string in catch block.
--
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]