Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd `DatabaseErrorKind` variants for isolation failures #1612
Comments
This comment has been minimized.
|
Seems reasonable. Can you point me at the specific error code and provide a minimal query/code to trigger the error? |
This comment has been minimized.
|
The error codes that I'm hoping to catch are:
Typically one or the other depending on whether the transaction is constructed with |
This comment has been minimized.
|
This error occurs for my use case specifically when two different services were attempting to do something that conflicts, but I've not been successful building a simplified use case. Non-Working Test (for
|
This comment has been minimized.
|
Calling the error |
added a commit
that referenced
this issue
Sep 10, 2018
sgrif
referenced this issue
Sep 10, 2018
Merged
Add an explicit error kind for failed `SERIALIZABLE` transactions #1839
This comment has been minimized.
|
I've cleaned up the test case and opened #1839 for the |
kestred commentedApr 4, 2018
•
edited
Feature Request
The
DatabaseErrorKindenum is intended to container error kind variants describing errors which are commonly recoverable at the application level.I'd like to have a variant or variants representing when an isolation failure occurs in the database (e.g. an otherwise valid request fails due to a conflicting transaction occurring at the same time; such as commit serializability, dead lock, etc).
In some applications these are frequently recoverable via simple retry logic (ideally implemented with randomized retry falloff), so it should make sense to have variants for them in the enum.
Checklist