github-actions[bot] commented on code in PR #62121:
URL: https://github.com/apache/doris/pull/62121#discussion_r3036765926
##########
be/src/exprs/function/function_search.cpp:
##########
@@ -434,6 +447,11 @@ Status
FunctionSearch::evaluate_inverted_index_with_search_param(
}
Review Comment:
This timer still starts after the SEARCH DSL-cache lookup/return path above.
When `dsl_cache->lookup()` returns a bitmap, the function exits before reaching
this scope, so `InvertedIndexQueryTime` remains `0` on query-cache hits. The
same fast path also never updates `inverted_index_query_cache_hit/miss`, so
cached SEARCH queries are still invisible in the profile even after this patch.
##########
be/src/exprs/function/function_search.cpp:
##########
@@ -191,6 +192,9 @@ Status FieldReaderResolver::resolve(const std::string&
field_name,
auto cache_it = _cache.find(binding_key);
if (cache_it != _cache.end()) {
*binding = cache_it->second;
+ if (_context->stats) {
Review Comment:
`_cache` here is the resolver's per-query binding cache, not
`InvertedIndexSearcherCache`. Incrementing `inverted_index_searcher_cache_hit`
on this fast path changes the metric's meaning and double-counts hits when the
same field is referenced multiple times in one SEARCH() evaluation. On a cold
segment, the first clause will record the real miss at the later cache-open
path, and a second clause on the same field will record a synthetic hit here
even though the global searcher cache was never consulted.
--
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]