Skip to content

Commit b5c8b64

Browse files
authored
chore: remove annoying message for debug (jina-ai#5901)
Signed-off-by: Joan Fontanals Martinez <[email protected]>
1 parent bae0363 commit b5c8b64

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

jina/serve/consensus/jina_raft/rpc.go

-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ func (rpc *RpcInterface) ProcessSingleData(
103103
}
104104
response, test := future.Response().(*pb.DataRequestProto)
105105
if test {
106-
rpc.Logger.Debug("Return from RAFT Apply:", "Response", response.String())
107106
return response, nil
108107
} else {
109108
err := future.Response().(error)

jina/serve/networking/__init__.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,10 @@ async def _handle_aiorpcerror(
339339
# if an Executor is down behind an API gateway, grpc.StatusCode.NOT_FOUND is returned
340340
# requests usually gets cancelled when the server shuts down
341341
# retries for cancelled requests will hit another replica in K8s
342+
skip_resetting = False
342343
if error.code() == grpc.StatusCode.UNAVAILABLE and 'not the leader' in error.details():
343344
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
344346
else:
345347
self._logger.debug(
346348
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(
366368

367369
# after connection failure the gRPC `channel` gets stuck in a failure state for a few seconds
368370
# 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:
370372
await connection_list.reset_connection(
371373
current_address, current_deployment
372374
)
@@ -378,7 +380,7 @@ async def _handle_aiorpcerror(
378380
details=error.details(),
379381
)
380382
else:
381-
if connection_list:
383+
if connection_list and not skip_resetting:
382384
await connection_list.reset_connection(
383385
current_address, current_deployment
384386
)

0 commit comments

Comments
 (0)