yiguolei commented on code in PR #64866:
URL: https://github.com/apache/doris/pull/64866#discussion_r3489064635


##########
be/src/exec/runtime_filter/runtime_filter_mgr.cpp:
##########
@@ -304,32 +300,41 @@ Status 
RuntimeFilterMergeControllerEntity::send_filter_size(std::shared_ptr<Quer
 }
 
 Status RuntimeFilterMgr::sync_filter_size(const PSyncFilterSizeRequest* 
request) {
-    LocalMergeContext* local_merge_filters = nullptr;
-    RETURN_IF_ERROR(get_local_merge_producer_filters(request->filter_id(), 
&local_merge_filters));
-    if (local_merge_filters == nullptr) {
+    std::shared_ptr<LocalMergeContext> context;
+    RETURN_IF_ERROR(get_local_merge_context(request->filter_id(), 
request->stage(), &context));
+    if (!context) {
         // Filter was removed during a recursive CTE stage reset; discard 
stale request.
         return Status::OK();
     }
-    for (auto producer : local_merge_filters->producers) {
+    for (const auto& producer : context->producers) {
         producer->set_synced_size(request->filter_size());
     }
     return Status::OK();
 }
 
 std::string RuntimeFilterMgr::debug_string() {
     std::string result = "Local Merger Info:\n";
-    std::lock_guard l(_lock);
-    for (const auto& [filter_id, ctx] : _local_merge_map) {
-        result += fmt::format("{}\n", ctx.merger->debug_string());
-        for (const auto& producer : ctx.producers) {
-            result += fmt::format("{}\n", producer->debug_string());
+    std::vector<std::pair<int32_t, LocalMergeContext>> local_merge_contexts;
+    std::vector<std::shared_ptr<RuntimeFilterConsumer>> consumers;
+    {
+        std::lock_guard l(_lock);
+        for (auto& [filter_id, ctx] : _local_merge_map) {

Review Comment:
   直接在这个lock 里,把string 打印完,为啥不行?



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