From 5f56ca66a83b6662dc2cd0393cba17b07755ef63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E5=87=AF?= Date: Wed, 23 Aug 2023 17:24:52 +0800 Subject: [PATCH 1/2] enhance bkd stats print --- .../olap/rowset/segment_v2/inverted_index_reader.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/be/src/olap/rowset/segment_v2/inverted_index_reader.cpp b/be/src/olap/rowset/segment_v2/inverted_index_reader.cpp index 992c4fa8d87506..d34dcd591d2864 100644 --- a/be/src/olap/rowset/segment_v2/inverted_index_reader.cpp +++ b/be/src/olap/rowset/segment_v2/inverted_index_reader.cpp @@ -613,7 +613,6 @@ Status BkdIndexReader::bkd_query(OlapReaderStatistics* stats, const std::string& Status BkdIndexReader::try_query(OlapReaderStatistics* stats, const std::string& column_name, const void* query_value, InvertedIndexQueryType query_type, uint32_t* count) { - uint64_t start = UnixMillis(); auto visitor = std::make_unique(nullptr, query_type, true); std::shared_ptr r; try { @@ -631,8 +630,7 @@ Status BkdIndexReader::try_query(OlapReaderStatistics* stats, const std::string& "BKD Query CLuceneError Occurred, error msg: {}", e.what()); } - LOG(INFO) << "BKD index try search time taken: " << UnixMillis() - start << "ms " - << " column: " << column_name << " result: " << *count; + VLOG_DEBUG << "BKD index try search column: " << column_name << " result: " << *count; return Status::OK(); } @@ -662,11 +660,9 @@ Status BkdIndexReader::query(OlapReaderStatistics* stats, const std::string& col // stats->inverted_index_query_cache_miss++; // } - uint64_t start = UnixMillis(); auto visitor = std::make_unique(bit_map, query_type); std::shared_ptr r; try { - SCOPED_RAW_TIMER(&stats->inverted_index_searcher_search_timer); auto st = bkd_query(stats, column_name, query_value, query_type, r, visitor.get()); if (!st.ok()) { if (st.code() == ErrorCode::END_OF_FILE) { @@ -686,9 +682,8 @@ Status BkdIndexReader::query(OlapReaderStatistics* stats, const std::string& col // term_match_bitmap->runOptimize(); // cache->insert(cache_key, term_match_bitmap, &cache_handle); - LOG(INFO) << "BKD index search time taken: " << UnixMillis() - start << "ms " - << " column: " << column_name << " result: " << bit_map->cardinality() - << " reader stats: " << r->stats.to_string(); + VLOG_DEBUG << "BKD index search column: " << column_name + << " result: " << bit_map->cardinality(); return Status::OK(); } From 47f6cb1866624f73c0e4f3bc1e3bf85ca4d996d8 Mon Sep 17 00:00:00 2001 From: airborne12 Date: Wed, 23 Aug 2023 17:56:20 +0800 Subject: [PATCH 2/2] format --- be/src/olap/rowset/segment_v2/inverted_index_reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/src/olap/rowset/segment_v2/inverted_index_reader.cpp b/be/src/olap/rowset/segment_v2/inverted_index_reader.cpp index d34dcd591d2864..603875f5206677 100644 --- a/be/src/olap/rowset/segment_v2/inverted_index_reader.cpp +++ b/be/src/olap/rowset/segment_v2/inverted_index_reader.cpp @@ -683,7 +683,7 @@ Status BkdIndexReader::query(OlapReaderStatistics* stats, const std::string& col // cache->insert(cache_key, term_match_bitmap, &cache_handle); VLOG_DEBUG << "BKD index search column: " << column_name - << " result: " << bit_map->cardinality(); + << " result: " << bit_map->cardinality(); return Status::OK(); }