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

Handle context.DeadlineExceeded when retrying a transaction #1191

Merged
merged 2 commits into from
Apr 24, 2024

Conversation

peterjan
Copy link
Member

Caught these errors on renterd shutdown, fixed by adding a context.DeadlineExceeded case in abortRetry.

2024-04-23T10:49:08Z INFO  bus  successfully saved 392 accounts
2024-04-23T10:49:42Z ERROR SQL  trace {"error": "context deadline exceeded", "elapsed": "34.701151966s", "rows": 0, "sql": "\nDELETE\nFROM slabs\nWHERE NOT EXISTS (SELECT 1 FROM slices WHERE slices.db_slab_id = slabs.id)\nAND slabs.db_buffered_slab_id IS NULL\n"}
2024-04-23T10:49:42Z WARN  sql  transaction attempt 1/7 failed, retry in 200ms,  err: context deadline exceeded
2024-04-23T10:49:42Z WARN  sql  transaction attempt 2/7 failed, retry in 500ms,  err: context deadline exceeded
2024-04-23T10:49:43Z WARN  sql  transaction attempt 3/7 failed, retry in 1s,  err: context deadline exceeded
2024-04-23T10:49:44Z WARN  sql  transaction attempt 4/7 failed, retry in 3s,  err: context deadline exceeded
2024-04-23T10:49:47Z WARN  sql  transaction attempt 5/7 failed, retry in 10s,  err: context deadline exceeded
2024-04-23T10:49:57Z WARN  sql  transaction attempt 6/7 failed, retry in 10s,  err: context deadline exceeded

@peterjan peterjan self-assigned this Apr 23, 2024
@peterjan peterjan marked this pull request as ready for review April 24, 2024 08:21
@ChrisSchinnerl ChrisSchinnerl merged commit 1777b3a into dev Apr 24, 2024
8 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the pj/fix-retry-transaction branch April 24, 2024 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants