Skip to content

Commit

Permalink
[Serve] Add log whenever a replica's health check succeeds after fail…
Browse files Browse the repository at this point in the history
…ing (ray-project#44162)

This change makes the Serve controller emit a log whenever the replica's health check succeeds after failing.

---------

Signed-off-by: Shreyas Krishnaswamy <[email protected]>
Co-authored-by: Edward Oakes <[email protected]>
  • Loading branch information
shrekris-anyscale and edoakes authored Mar 22, 2024
1 parent c384c1a commit b83d4d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/ray/serve/_private/deployment_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,11 @@ def check_health(self) -> bool:
elif response is ReplicaHealthCheckResponse.SUCCEEDED:
# Health check succeeded. Reset the consecutive failure counter
# and mark the replica healthy.
if self._consecutive_health_check_failures > 0:
logger.info(
f"{self._replica_id} passed the health check after "
f"{self._consecutive_health_check_failures} consecutive failures."
)
self._consecutive_health_check_failures = 0
self._healthy = True
elif response is ReplicaHealthCheckResponse.APP_FAILURE:
Expand Down

0 comments on commit b83d4d6

Please sign in to comment.