mrhhsg opened a new pull request, #70661: URL: https://github.com/apache/doris/pull/70661
### Background Runtime filter producers can publish to direct local consumers and to local or global mergers. A merger accumulates producer filters before the merged filter is delivered locally or sent to remote consumers. ### What problem does this PR solve? Issue Number: None Related PR: #68684 (established private-copy behavior for shared inputs) PR Type: Refactor Problem Summary: The merger previously accepted an exclusive-ownership hint from its callers to avoid copying some mutable inputs. That contract depends on producer routing and RPC-input lifetime assumptions spread across several layers. This refactor makes the merger accumulate in a private copy and makes IN-to-Bloom conversion copy its input Bloom before inserting IN values. Filter results and delivery routing remain unchanged; formerly exclusive paths now perform an additional copy. ### Details - **Moves vs. logic changes:** Remove the ownership hints, producer-side ownership inference, and direct-adoption branches; retain the existing publication, readiness, and RPC routing. - **Behavior change:** Clone the first merger input even when a caller previously considered it exclusive, and clone a transitional Bloom input before merging IN values into it. - **Compatibility:** Internal BE C++ API only; no SQL, RPC wire, or persisted-format changes. - **Performance impact:** Formerly exclusive paths incur an additional deep copy under the existing merger lock. Production performance and peak-memory impact have not been benchmarked. - **Rollback:** Revert this refactor if the added copy cost is unacceptable. ### Testing - Local ASAN BE/FE build, including FE checkstyle: `BUILD_TYPE=ASAN ./build.sh --be --fe -j 16` passed. - Local BE unit tests: the six focused ownership/clone cases passed; the five changed ownership assertions failed against the old implementation as expected. `./run-be-ut.sh --run -j 16 --filter='*RuntimeFilter*:*BloomFilter*:*MinMax*:*SyncSize*'` passed 419/419 tests. - Local single-BE SQL regression via `run-regression-test.sh`: `rfv2`, `set_operator_in_filter`, and `rf_bucket_pruning` each passed (one suite each). - `build-support/clang-format.sh`, `build-support/check-format.sh`, `build-support/check-build-hygiene.sh`, and `git diff --check` passed. The changed-line `build-support/run-clang-tidy.sh` check passed with the Clang resource directory configured. - Not run: multi-BE RPC end-to-end testing, mixed-version testing, or a production-performance/peak-memory A/B benchmark. ### Release note None ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: No - Pre-submission status: Partially verified: multi-BE behavior and production performance remain unmeasured. ### AI Disclosure - Tool: Codex - Generated: Code, unit tests, and this description - Human review: Not yet performed -- 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]
