Problem
RouteActivity#queryAssignment assumes every broker map contains the master broker id:
Broker broker = brokerIdMap.get(MixAll.MASTER_ID);
...
.setBroker(broker)
If route metadata only has non-master broker entries, broker is null and the protobuf builder can fail while building the assignment.
Expected behavior
A queue row without a master broker should be skipped. If no assignment can be built after skipping invalid rows, the existing FORBIDDEN / no readable queue response should be returned instead of failing the request exceptionally.
Impact
Malformed or partial route metadata can make Proxy gRPC QueryAssignment fail instead of returning a controlled response. This affects the Proxy/gRPC client assignment path.
Suggested fix
- Add a null check after
brokerIdMap.get(MixAll.MASTER_ID).
- Continue to the next queue row when the master broker is absent.
- Add regression coverage for a broker map that contains only a non-master broker id.
Problem
RouteActivity#queryAssignmentassumes every broker map contains the master broker id:If route metadata only has non-master broker entries,
brokeris null and the protobuf builder can fail while building the assignment.Expected behavior
A queue row without a master broker should be skipped. If no assignment can be built after skipping invalid rows, the existing
FORBIDDEN/no readable queueresponse should be returned instead of failing the request exceptionally.Impact
Malformed or partial route metadata can make Proxy gRPC
QueryAssignmentfail instead of returning a controlled response. This affects the Proxy/gRPC client assignment path.Suggested fix
brokerIdMap.get(MixAll.MASTER_ID).