Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle
context.DeadlineExceeded
when retrying a transaction (#1191)
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 ```
- Loading branch information