Error Handling and Pitfalls in Distributed Go Apps
summary
CockroachDB records a surge of bugs in 2018–2019 traced to Go error idioms: local pointer equality breaks when errors cross processes, causing wrong retry decisions (example: client data crafting an error string that triggers infinite retries). Solution is a drop‑in errors library that serializes errors via protobuf encode/decode, preserves stack traces, and computes identity markers from wrapped types and messages so errors.Is across network works. Library adds a decoder registry for concrete types, integrates with gRPC, and is deployed in CockroachDB.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 2:23Error Visions
- 6:31Errors in Practice
- 10:30Generalizing the Problem
- 11:15Standard Libraries
- 12:18Problems
- 12:58Linked Lists
- 14:53Equivalence
- 15:31Encodings
- 15:55Identity Markers
- 17:05Overriding Identity Markers
- 17:50Error S
- 18:53Embedded Stack Trace
- 19:56Error Value Proposal
- 20:43Summary
- 22:10Questions
- 26:22Conclusion
related talks
07mStandardizing Errors in Go: A Practical Guide with Dapr
35mDesigning for failure
42mDesigning for failure
46mThe Do's and Don'ts of Error Handling
24mNavigating Distributed Databases: Challenges & Opportunities
48mBuilding mission-critical applications with CockroachDB
13mLightning Talk: Standardizing Errors: A Practical Guide with Dapr
40mDeep Dive: etcd
