Skip to content

Cardinality violations in serverside streaming RPC. #8362

Open
@Pranjali-2501

Description

@Pranjali-2501

In a typical server-side stream, the client sends a single request and then receives a sequence of messages from the server until an EOF or error. The official Go gRPC implementation enforces this by only allowing the client to call Recv() and the server to call Send(). This prevents clients from inadvertently calling Send() on a server-side stream, thereby avoiding a cardinality violation by design.
However, if we implement our own custom RPCs, it's theoretically possible for a client to cause cardinality violations by attempt to call Client.Send().

Should I handled those cases for custom RPCs and add specific tests to address these potential cardinality violation scenarios?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions