airborne12 commented on code in PR #39649: URL: https://github.com/apache/doris/pull/39649#discussion_r1741372911
########## be/src/olap/rowset/segment_v2/inverted_index_file_writer.cpp: ########## @@ -337,110 +357,125 @@ int64_t InvertedIndexFileWriter::write_v1() { auto* new_index_info = _file_info.add_index_info(); *new_index_info = index_info; } catch (CLuceneError& err) { - LOG(ERROR) << "CLuceneError occur when close idx file " - << InvertedIndexDescriptor::get_index_file_path_v1(_index_path_prefix, - index_id, index_suffix) + auto index_path = InvertedIndexDescriptor::get_index_file_path_v1( + _index_path_prefix, index_id, index_suffix); + LOG(ERROR) << "CLuceneError occur when close idx file " << index_path << " error msg: " << err.what(); - throw err; + return Status::Error<ErrorCode::INVERTED_INDEX_CLUCENE_ERROR>( + "CLuceneError occur when close idx file: {}, error msg: {}", index_path, Review Comment: same as upper comment. ########## be/src/olap/rowset/segment_v2/inverted_index_fs_directory.cpp: ########## @@ -353,6 +370,7 @@ void DorisFSDirectory::FSIndexOutput::close() { } } else { LOG(WARNING) << "File writer is nullptr, ignore finalize and close."; + _CLTHROWA(CL_ERR_IO, "close file writer error, _writer = nullptr"); Review Comment: why throw error here? ########## be/src/olap/rowset/segment_v2/inverted_index_file_writer.cpp: ########## @@ -337,110 +357,125 @@ int64_t InvertedIndexFileWriter::write_v1() { auto* new_index_info = _file_info.add_index_info(); *new_index_info = index_info; } catch (CLuceneError& err) { - LOG(ERROR) << "CLuceneError occur when close idx file " - << InvertedIndexDescriptor::get_index_file_path_v1(_index_path_prefix, - index_id, index_suffix) + auto index_path = InvertedIndexDescriptor::get_index_file_path_v1( + _index_path_prefix, index_id, index_suffix); + LOG(ERROR) << "CLuceneError occur when close idx file " << index_path Review Comment: CLuceneError occur when write_v1 idx file -- 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