Skip to content

Document missing gRPC's default unit in GrpcClientProperties #49879

@dlwldnjs1009

Description

@dlwldnjs1009

GrpcClientProperties.Channel.Inbound.Message.maxSize and GrpcClientProperties.Channel.Inbound.Metadata.maxSize are missing the @DataSizeUnit(DataUnit.BYTES) annotation that their server-side equivalents in GrpcServerProperties have.

Server (annotated):

// GrpcServerProperties.Inbound.Message
@DataSizeUnit(DataUnit.BYTES)
private DataSize maxSize = DataSize.ofBytes(4194304);

// GrpcServerProperties.Inbound.Metadata
@DataSizeUnit(DataUnit.BYTES)
private DataSize maxSize = DataSize.ofBytes(8192);

Client (missing):

// GrpcClientProperties.Channel.Inbound.Message
private DataSize maxSize = DataSize.ofBytes(4194304);

// GrpcClientProperties.Channel.Inbound.Metadata
private DataSize maxSize = DataSize.ofBytes(8192);

The server-side Javadoc also documents "If a data size suffix is not specified, bytes will be used" while the client-side does not.

This is similar to gh-49722 where the @DurationUnit annotations were added consistently across gRPC properties. The commit 5b7a6a9 for that issue updated the Duration fields in GrpcClientProperties but the DataSize fields in the same class were not addressed.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions