File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,6 @@ func (rpc *RpcInterface) ProcessSingleData(
103
103
}
104
104
response , test := future .Response ().(* pb.DataRequestProto )
105
105
if test {
106
- rpc .Logger .Debug ("Return from RAFT Apply:" , "Response" , response .String ())
107
106
return response , nil
108
107
} else {
109
108
err := future .Response ().(error )
Original file line number Diff line number Diff line change @@ -339,8 +339,10 @@ async def _handle_aiorpcerror(
339
339
# if an Executor is down behind an API gateway, grpc.StatusCode.NOT_FOUND is returned
340
340
# requests usually gets cancelled when the server shuts down
341
341
# retries for cancelled requests will hit another replica in K8s
342
+ skip_resetting = False
342
343
if error .code () == grpc .StatusCode .UNAVAILABLE and 'not the leader' in error .details ():
343
344
self ._logger .debug (f'RAFT node of { current_deployment } is not the leader. Trying next replica, if available.' )
345
+ skip_resetting = True # no need to reset, no problem with channel
344
346
else :
345
347
self ._logger .debug (
346
348
f'gRPC call to { current_deployment } errored, with error { format_grpc_error (error )} and for the { retry_i + 1 } th time.'
@@ -366,7 +368,7 @@ async def _handle_aiorpcerror(
366
368
367
369
# after connection failure the gRPC `channel` gets stuck in a failure state for a few seconds
368
370
# removing and re-adding the connection (stub) is faster & more reliable than just waiting
369
- if connection_list :
371
+ if connection_list and not skip_resetting :
370
372
await connection_list .reset_connection (
371
373
current_address , current_deployment
372
374
)
@@ -378,7 +380,7 @@ async def _handle_aiorpcerror(
378
380
details = error .details (),
379
381
)
380
382
else :
381
- if connection_list :
383
+ if connection_list and not skip_resetting :
382
384
await connection_list .reset_connection (
383
385
current_address , current_deployment
384
386
)
You can’t perform that action at this time.
0 commit comments