Add option to configure the deadline of `ChannelManager#getServerCapabilities`
fextr opened this issue · 6 comments
Expected Behavior
When I setRpcTimeout in WorkflowServiceStubsOptions it overrides the deadline in getServerCapabilitiesWithRetryOrThrow
Actual Behavior
I'm enforced to use deprecated setHealthCheckAttemptTimeout because it is still used in the ChannelManager
Steps to Reproduce the Problem
- Set
rpcTimeout
inWorkflowServiceStubsOptions
. - Observe that it does not override the deadline in
getServerCapabilitiesWithRetryOrThrow
- Note the usage of the deprecated
healthCheckAttemptTimeout
inChannelManager
.
Specifications
- Version: Java SDK 1.24.0
If that is acceptable, I want to contribute to the project and fix this issue.
getServerCapabilities
is intentionally overriding the rpc timeout. If you need to configure a different deadline on getServerCapabilities
it would need to be a separate option.
getServerCapabilities
is intentionally overriding the rpc timeout. If you need to configure a different deadline ongetServerCapabilities
it would need to be a separate option.
Is your suggestion to introduce a new option, such as serverCapabilitiesTimeout
, in the ServiceStubsOptions
correct?
Yes, it should be called getSystemInfoTimeout
though serverCapabilities
is just an internal name to the Java SDK.
Why do you need to configure the deadline on getSystemInfo
?
Why do you need to configure the deadline on
getSystemInfo
?
We have encountered a problem connecting to Temporal after upgrading Java SDK from version 1.23.2 to 1.24.0. When we increased the timeout problem was solved. Stack trace:
| 2024-07-01 04:59:31.284 | at io.temporal.internal.retryer.GrpcRetryer.retryWithResult(GrpcRetryer.java:60) |
| 2024-07-01 04:59:31.280 | at io.temporal.api.workflowservice.v1.WorkflowServiceGrpc$WorkflowServiceBlockingStub.getSystemInfo(WorkflowServiceGrpc.java:4645) |
| 2024-07-01 04:59:31.280 | at io.temporal.serviceclient.SystemInfoInterceptor.getServerCapabilitiesOrThrow(SystemInfoInterceptor.java:132) |
| 2024-07-01 04:59:31.280 | at io.temporal.serviceclient.SystemInfoInterceptor.lambda$getServerCapabilitiesWithRetryOrThrow$0(SystemInfoInterceptor.java:118) |
| 2024-07-01 04:59:31.280 | at io.temporal.internal.retryer.GrpcSyncRetryer.retry(GrpcSyncRetryer.java:69) |
| 2024-07-01 04:59:31.279 | io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 0.398648053s. Name resolution delay 2.493018773 seconds. [closed=[], open=[[buffered_nanos=695520709, remote_addr=namespace-dev.etmgc.tmprl.cloud/18.157.55.99:7233]]] |
| 2024-07-01 04:59:31.279 | at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:268) |
| 2024-07-01 04:59:31.279 | at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:249) |
| 2024-07-01 04:59:31.279 | at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:167) |
| 2024-07-01 04:59:24.584 | 04:59:24.584 [:] [main] INFO i.t.s.WorkflowServiceStubsImpl - Created WorkflowServiceStubs for channel: ManagedChannelOrphanWrapper{delegate=ManagedChannelImpl{logId=1, target=namespace-dev.etmgc.tmprl.cloud:7233}} |
PS: Actual namespace name is different