Skip to content

Commit

Permalink
chore: remove annoying message for debug (#5901)
Browse files Browse the repository at this point in the history
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
  • Loading branch information
JoanFM committed May 31, 2023
1 parent bae0363 commit b5c8b64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion jina/serve/consensus/jina_raft/rpc.go
Expand Up @@ -103,7 +103,6 @@ func (rpc *RpcInterface) ProcessSingleData(
}
response, test := future.Response().(*pb.DataRequestProto)
if test {
rpc.Logger.Debug("Return from RAFT Apply:", "Response", response.String())
return response, nil
} else {
err := future.Response().(error)
Expand Down
6 changes: 4 additions & 2 deletions jina/serve/networking/__init__.py
Expand Up @@ -339,8 +339,10 @@ async def _handle_aiorpcerror(
# if an Executor is down behind an API gateway, grpc.StatusCode.NOT_FOUND is returned
# requests usually gets cancelled when the server shuts down
# retries for cancelled requests will hit another replica in K8s
skip_resetting = False
if error.code() == grpc.StatusCode.UNAVAILABLE and 'not the leader' in error.details():
self._logger.debug(f'RAFT node of {current_deployment} is not the leader. Trying next replica, if available.')
skip_resetting = True # no need to reset, no problem with channel
else:
self._logger.debug(
f'gRPC call to {current_deployment} errored, with error {format_grpc_error(error)} and for the {retry_i + 1}th time.'
Expand All @@ -366,7 +368,7 @@ async def _handle_aiorpcerror(

# after connection failure the gRPC `channel` gets stuck in a failure state for a few seconds
# removing and re-adding the connection (stub) is faster & more reliable than just waiting
if connection_list:
if connection_list and not skip_resetting:
await connection_list.reset_connection(
current_address, current_deployment
)
Expand All @@ -378,7 +380,7 @@ async def _handle_aiorpcerror(
details=error.details(),
)
else:
if connection_list:
if connection_list and not skip_resetting:
await connection_list.reset_connection(
current_address, current_deployment
)
Expand Down

0 comments on commit b5c8b64

Please sign in to comment.