gRPC 10 ABORTED vs 14 UNAVAILABLE
Both gRPC 10 (ABORTED) and 14 (UNAVAILABLE) belong to the gRPC Status Codes category. 10 indicates that the operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort. Meanwhile, 14 means that the service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff.
Mô tả
The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort.
Khi bạn thấy mã này
A transaction or optimistic concurrency check failed — for example, a read-modify-write cycle detected a conflict with another concurrent operation.
Cách khắc phục
Retry the entire read-modify-write sequence from the beginning. Implement proper optimistic concurrency control with version tokens or ETags.
Mô tả
The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff.
Khi bạn thấy mã này
The server is overloaded, shutting down, or a network partition occurred. This is the most common code to retry on, as it's explicitly transient.
Cách khắc phục
Retry with exponential backoff. If persistent, check the server health, load balancer configuration, and network connectivity between client and server.
Sự khác biệt chính
gRPC 10: The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort.
gRPC 14: The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff.
You encounter 10 when a transaction or optimistic concurrency check failed — for example, a read-modify-write cycle detected a conflict with another concurrent operation.
You encounter 14 when the server is overloaded, shutting down, or a network partition occurred. This is the most common code to retry on, as it's explicitly transient.
Khi nào dùng cái nào
For 10 (ABORTED): Retry the entire read-modify-write sequence from the beginning. Implement proper optimistic concurrency control with version tokens or ETags. For 14 (UNAVAILABLE): Retry with exponential backoff. If persistent, check the server health, load balancer configuration, and network connectivity between client and server.