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


##########
be/src/runtime/fragment_mgr.cpp:
##########
@@ -1357,6 +1365,7 @@ Status FragmentMgr::rerun_fragment(const 
std::shared_ptr<brpc::ClosureGuard>& gu
 
         // Insert new PFC into _pipeline_map (old one was removed)
         _pipeline_map.insert({info.params.query_id, info.params.fragment_id}, 
context);
+        increment_fragment_executing_count();

Review Comment:
   [P1] Count only a successfully installed rebuild. This RPC can be replayed 
by the transport: the cached BRPC channel is created with `max_retry = 10`, 
this caller does not override it, and the request has no round/request token. 
If the first `REBUILD` reaches this handler but its response connection breaks, 
the retry reaches this block again. `ConcurrentContextMap::insert()` silently 
keeps the existing key and returns no result, yet this line increments again; 
the eventual single erase decrements once, so `currentFragmentNum` remains 
permanently high (and `set_pipeline_context()` also points at the rejected 
second PFC). Please make rebuild idempotent or disable retries, couple the 
increment to an insertion that actually succeeded, and add a duplicate/retry 
case to the test.



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