Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function to determine if an error is retryable #220

Open
MathieuBordere opened this issue Dec 16, 2022 · 1 comment
Open

Add function to determine if an error is retryable #220

MathieuBordere opened this issue Dec 16, 2022 · 1 comment
Labels
Feature New feature, not a bug

Comments

@MathieuBordere
Copy link

LXD (and JuJu) use a function to determine if an error returned by go-dqlite is transient, and thus retryable, or not. Ideally go-dqlite should be able to inform a user if an error is transient.

https://github.com/lxc/lxd/blob/fb36a86f0d4dd4dcdfae0568aedb2275bb8c9539/lxd/db/query/retry.go#L57

@tomponline
Copy link
Member

tomponline commented Dec 16, 2022

Thanks! It would be good if it uses the dqliteDriver.Error error code too rather than string matching. If possible.

Like:

https://github.com/lxc/lxd/blob/50b4f4aa27a863998e9ea3079625fbaecb44d5e6/lxd/db/storage_buckets.go#L541-L543

@MathieuBordere MathieuBordere added the Feature New feature, not a bug label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature, not a bug
Projects
None yet
Development

No branches or pull requests

2 participants