BiteTheDDDDt opened a new pull request, #64866:
URL: https://github.com/apache/doris/pull/64866
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Local runtime filter merge can deadlock when one join build
instance publishes a local-merge runtime filter while another instance sends
its runtime filter size. The old local merge context lock protected both the
merger and the producer list, so one path could hold a producer runtime filter
lock and then wait for the context lock while another path held the context
lock and then waited for a producer lock.
This change gives RuntimeFilterMerger its own internal synchronization and
makes LocalMergeContext expose a snapshot of the merger and producers. Publish,
send-size, and sync-size paths take the context lock only while copying that
snapshot, then merge filters or update producer sizes outside the context lock.
RuntimeFilterMerger returns the ready transition from merge_from directly,
removing the separate unlocked ready check.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- build-support/clang-format.sh
be/src/exec/runtime_filter/runtime_filter_merger.h
be/src/exec/runtime_filter/runtime_filter_mgr.cpp
be/src/exec/runtime_filter/runtime_filter_mgr.h
be/src/exec/runtime_filter/runtime_filter_producer.cpp
be/test/exec/runtime_filter/runtime_filter_merger_test.cpp
be/test/exec/runtime_filter/runtime_filter_mgr_test.cpp
- git diff --cached --check
- ./run-be-ut.sh --run --filter=RuntimeFilterMgrTest.*
- ./run-be-ut.sh --run --filter=RuntimeFilterMergerTest.*
- Behavior changed: No
- Does this need documentation: No
--
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]