agent-substrate / agent-substrate/substrate

Improve retry logic in atenet when resuming actors

Open
#1,562 0 comments 0 reactions 0 assignees View on GitHub
area/api area/api-machinery area/network kind/design
Dominant language
Go
Stars
1.8k
Forks
316
Avg merge
2d 43m
Merged PRs (30d)
287

Description

The atenet is deciding when to retry a `ResumeActor` call just by looking at the gRPC status. It always retries `Aborted`, and retries `ResourceExhausted`, `FailedPrecondition` and and `Unavailable` if request parking is enabled.

The main issue with this approach is that the gRPC status codes are not granular enough to distinguish errors that should be retried from errors that shouldn't. For example, today we keep retrying `ResumeActor` calls on actors in `CRASHED` state.

I think we need a better contract so that downstream consumers of the API (e.g. atenet) can accurately decide whether to safely retry or not. One option we could consider is attaching the `RetryInfo`[1] proto in the status details.

FYI @bowei @LiorLieberman

[1]: https://pkg.go.dev/google.golang.org/genproto/googleapis/rpc/errdetails#RetryInfo

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.