Copilot commented on code in PR #61952:
URL: https://github.com/apache/doris/pull/61952#discussion_r3015233752
##########
fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java:
##########
@@ -835,6 +855,12 @@ protected void sendPipelineCtx() throws Exception {
// So that we can use one RPC to send all fragment instances
of a BE.
for (Map.Entry<TNetworkAddress, TPipelineFragmentParams> entry
: tParams.entrySet()) {
Long backendId =
this.addressToBackendID.get(entry.getKey());
+ if (backendId == null) {
+ LOG.warn("query {} sendPipelineCtx: addressToBackendID
lookup returned null!"
+ + " address={}, fragmentId={},
addressToBackendID={}",
+ DebugUtil.printId(queryId), entry.getKey(),
+ fragment.getFragmentId(), addressToBackendID);
Review Comment:
If `addressToBackendID.get(entry.getKey())` returns null, the code only logs
but still continues to create PipelineExecContext and add entries keyed by
`backendId`. This will lead to a NullPointerException shortly after (e.g.,
PipelineExecContext constructor uses `backend.getHost()`), and also stores
`null` backend ids into `backendFragments` / `pipelineExecContexts`. Consider
failing fast here (throw a UserException / set queryStatus) or skipping this
entry so the coordinator doesn’t proceed with invalid routing state.
```suggestion
fragment.getFragmentId(),
addressToBackendID);
continue;
```
--
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]