Handle backoff with new error - #1500
Conversation
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
| await informer.fire_completion_event(action.name) | ||
|
|
||
| async def _bg_handle_resource_exhausted(self, action: Action, error: ConnectError) -> None: | ||
| action.resource_exhausted_retries += 1 |
There was a problem hiding this comment.
Should we add a max_resource_exhausted_retries?
There was a problem hiding this comment.
or do we want to retry forever?
There was a problem hiding this comment.
my vote is retry forever. upcoming observability should expose long running tasks to the user to manually abort.
| from connectrpc.code import Code | ||
| from connectrpc.errors import ConnectError | ||
|
|
||
| RETRYABLE_CODES = frozenset({Code.UNAVAILABLE, Code.RESOURCE_EXHAUSTED, Code.INTERNAL}) |
There was a problem hiding this comment.
we don't want to use RetryUnaryInterceptor? why?
There was a problem hiding this comment.
maybe we do... my reasoning is that unavailable is a network level thing. resource_exhausted we think is not a thing that's sent by nginx/envoy/nlbs, so basically the network request successfully went through - but the server said hold off.
honestly i don't know why we retry on code.internal either - we should not, that would just add to the storm... but i suppose that does give us time to live patch something. we should probably add a sentry on this to see how often we hit this/recover.
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
Summary
Handle
RESOURCE_EXHAUSTEDin the remote controller instead of the generic RPC retry interceptor.ResourceExhaustedErroras a specializedSlowDownError.action.retries.Why
Resource exhaustion is not a terminal action error and may persist for an arbitrary amount of time. Consuming the normal bounded retry budget would eventually fail runs that should continue waiting.
Testing
RESOURCE_EXHAUSTEDbypasses the generic retry interceptor.run_concurrency: 1action_concurrency: 2depth: 5