gRPC 1 CANCELLED vs 10 ABORTED
Both gRPC 1 (CANCELLED) and 10 (ABORTED) belong to the gRPC Status Codes category. 1 indicates that the operation was cancelled, typically by the caller. Meanwhile, 10 means that the operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort.
विवरण
The operation was cancelled, typically by the caller.
जब आप इसे देखें
The client explicitly cancelled the RPC, or a deadline or context cancellation propagated to the server before it could finish processing.
कैसे ठीक करें
If unexpected, check whether the client is setting too-short deadlines or if cancellation is being triggered inadvertently in your call chain.
विवरण
The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort.
जब आप इसे देखें
A transaction or optimistic concurrency check failed — for example, a read-modify-write cycle detected a conflict with another concurrent operation.
कैसे ठीक करें
Retry the entire read-modify-write sequence from the beginning. Implement proper optimistic concurrency control with version tokens or ETags.
मुख्य अंतर
gRPC 1: The operation was cancelled, typically by the caller.
gRPC 10: The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort.
You encounter 1 when the client explicitly cancelled the RPC, or a deadline or context cancellation propagated to the server before it could finish processing.
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.
कब किसका उपयोग करें
For 1 (CANCELLED): If unexpected, check whether the client is setting too-short deadlines or if cancellation is being triggered inadvertently in your call chain. For 10 (ABORTED): Retry the entire read-modify-write sequence from the beginning. Implement proper optimistic concurrency control with version tokens or ETags.