github-actions[bot] commented on code in PR #69053:
URL: https://github.com/apache/doris/pull/69053#discussion_r4292689682


##########
be/src/exprs/vcompound_pred.h:
##########
@@ -270,9 +273,24 @@ class VCompoundPred : public VectorizedFnCall {
         }
     }
 
+    // 
NOLINTNEXTLINE(readability-function-size,readability-function-cognitive-complexity):
 Keep each operator's bitmap and score updates together.
     Status evaluate_inverted_index(VExprContext* context, uint32_t 
segment_num_rows) override {
         segment_v2::InvertedIndexResultBitmap res;
         bool all_pass = true;
+        auto index_context = context->get_index_context();
+        auto query_context = index_context->get_index_query_context();
+        auto parent_similarity =
+                query_context != nullptr ? 
query_context->collection_similarity : nullptr;
+        CollectionSimilarityPtr branch_similarity;
+        if (parent_similarity != nullptr) {
+            branch_similarity = std::make_shared<CollectionSimilarity>();

Review Comment:
   [P2] Account for the new per-branch score maps
   
   Each new `CollectionSimilarity` owns a `ScoreMap` defined as a 
default-allocator `phmap::flat_hash_map`, so its storage bypasses the query 
MemTracker (the jemalloc hooks only forward allocations). For an alternating 
scored tree such as `A OR (B AND (C OR (D AND ...)))` whose MATCH leaves each 
hit N rows, ancestors retain populated maps while the right subtree is 
evaluated, giving O(depth * N) live score entries. These additional buffers can 
substantially exceed the query memory limit without being charged to it. Please 
use the existing Doris allocator-aware map, or equivalent balanced accounting, 
for the branch score storage.



-- 
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]

Reply via email to