mrhhsg opened a new pull request, #71455: URL: https://github.com/apache/doris/pull/71455
### Background Runtime filters send producer wrappers to instance-local consumers and merged wrappers to query-level consumers. Both paths notify consumers through a runtime filter manager. The local publication helper currently belongs to the producer, even when the merger is the data source. ### What problem does this PR solve? Issue Number: None Related PR: #70661 (merger ownership), #68684 (mixed-target wrapper isolation) PR Type: Refactor Problem Summary: The existing helper takes a separate source object and a scope boolean while looking up consumers with the producer's filter id, making the source/target contract harder to verify. Move local publication to `RuntimeFilter::_push_to_local(RuntimeFilterMgr*)`: the receiver supplies both the filter id and the signal source, and callers specify the target manager explicitly. Most added lines strengthen behavior-preservation tests; existing users should see no behavior change. ### Details - **Moves vs. logic changes:** Move the consumer lookup and notification loop to the base class, remove the producer's three-argument helper, and update both local call sites. Iterating by const reference also avoids redundant consumer shared-pointer copies; no routing or state-machine changes are intended. - **Behavior change:** None intended. Preserve merge readiness, stage checks, publication order, wrapper isolation, disabled-filter handling, and remote routing. Producer and manager/merger tests plus the existing SQL regression passed locally. - **Compatibility:** No changes to SQL, configuration, class layout, metadata, storage formats, wire protocols, or log/metric names. The new helper is internal and non-virtual. - **Performance impact:** None expected: the same manager lookup and consumer traversal, without additional wrapper copies or locks. No benchmark was run. - **Rollback:** A plain revert is safe; no persisted state or inter-process format changes. ### Testing Run locally on this change: - `./run-be-ut.sh --run -j 48 --filter='RuntimeFilterProducerTest.*'`: 17 tests passed under ASAN_UT, covering local/merged publication and wrapper ownership. - `./run-be-ut.sh --run -j 48 --filter='RuntimeFilterMgrTest.*:RuntimeFilterMergerTest.*'`: 20 tests passed under ASAN_UT. - `./run-regression-test.sh --conf output/local-regression/regression-conf-31900.groovy --run -d correctness_p0 -s test_runtime_filter`: one suite passed on a single-BE cluster; existing expected output was unchanged. These are behavior-preservation checks, not a reproduced pre-existing SQL failure. Multi-BE, mixed-version, remote RPC end-to-end, and performance tests were not run. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: OpenAI Codex (model not stated) - Generated: Code, tests, and this description - Human review: Not stated -- 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]
