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


##########
be/src/exec/scan/scanner.h:
##########
@@ -205,9 +205,15 @@ class Scanner {
         return doris::TabletStorageType::STORAGE_TYPE_REMOTE;
     }
 
-    // Returns true if this scanner's partition has been pruned by a runtime 
filter.
-    // Overridden by OlapScanner to check partition pruning state.
-    virtual bool check_partition_pruned() const { return false; }
+    // Returns true if this scanner's scan range has been pruned by a runtime 
filter.
+    virtual bool is_pruned_by_runtime_filter() const { return false; }
+
+    // Releases resources owned by a scanner that runtime-filter pruning makes 
unnecessary before
+    // open(). The scanner will not be scheduled again after this call.
+    virtual void release_unopened_resources() {

Review Comment:
   [P2] Release base expression clones for pruned unopened scanners
   
   The abandonment hook only resets `_has_prepared`, but every scanner already 
cloned `_conjuncts`, `_projections`, and `_intermediate_projections` in 
`Scanner::init()`. With bounded concurrency, a late RF can prune many 
never-prepared tablet scanners while `ScanLocalState::_scanners` retains those 
clones and their thread-local function state until operator teardown. This 
defeats prompt reclamation for a long scan with many scanners or complex 
expressions and is distinct from the ReaderParams/BlockReader cleanup threads. 
Please clear the inherited context vectors here (and any other unopened base 
buffers), and extend the bounded-concurrency test to verify they are released.



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