Skip to content

Commit

Permalink
[opt](inverted index) Add troubleshooting logs (#44182)
Browse files Browse the repository at this point in the history
Problem Summary:
1. Occasionally encounter 'No segments* file found' issue, need to add
troubleshooting logs.
  • Loading branch information
zzzxl1993 authored Nov 19, 2024
1 parent 34383ad commit 606d075
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions be/src/olap/rowset/segment_v2/inverted_index_searcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Status FulltextIndexSearcherBuilder::build(lucene::store::Directory* directory,
reader = lucene::index::IndexReader::open(
directory, config::inverted_index_read_buffer_size, close_directory);
} catch (const CLuceneError& e) {
std::vector<std::string> file_names;
directory->list(&file_names);
LOG(ERROR) << fmt::format("Directory list: {}", fmt::join(file_names, ", "));
std::string msg = "FulltextIndexSearcherBuilder build error: " + std::string(e.what());
if (e.number() == CL_ERR_EmptyIndexSegment) {
return Status::Error<ErrorCode::INVERTED_INDEX_FILE_CORRUPTED>(msg);
Expand Down

0 comments on commit 606d075

Please sign in to comment.