Skip to content

[Bug] Proxy gRPC queryAssignment can set a null master broker #10770

Description

@Aias00

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions