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.
Deskripsi
The operation was cancelled, typically by the caller.
Ketika Anda Melihatnya
The client explicitly cancelled the RPC, or a deadline or context cancellation propagated to the server before it could finish processing.
Cara Memperbaiki
If unexpected, check whether the client is setting too-short deadlines or if cancellation is being triggered inadvertently in your call chain.
Deskripsi
The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort.
Ketika Anda Melihatnya
A transaction or optimistic concurrency check failed — for example, a read-modify-write cycle detected a conflict with another concurrent operation.
Cara Memperbaiki
Retry the entire read-modify-write sequence from the beginning. Implement proper optimistic concurrency control with version tokens or ETags.
Perbedaan Utama
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.
Kapan Menggunakan Yang Mana
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.