Skip to content

Document gRPC's default unit in configuration properties consistently #49722

@dlwldnjs1009

Description

@dlwldnjs1009

The period and delay fields in GrpcServerHealthProperties.Schedule default to
5 seconds, but they do not declare @DurationUnit(ChronoUnit.SECONDS).

As a result, bare number values such as
spring.grpc.server.health.schedule.period=5 are bound as 5 milliseconds.

I noticed that the other Duration fields in GrpcServerProperties explicitly use
@DurationUnit(ChronoUnit.SECONDS), for example:

  • Shutdown.gracePeriod
  • Keepalive.time, Keepalive.timeout
  • Keepalive.Permit.time
  • Keepalive.Connection.maxIdleTime, maxAge, gracePeriod

I couldn't tell if the current behavior for period and delay is intentional or if
these two fields were meant to follow the same pattern.

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