-
Type: New Feature
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Internal Client, Stability
-
Labels:None
I propose adding a mechanism and/or specification to easily differentiate transient errors from permanent ones to make writing robust client-side code easier.
Transient error (replica set failure for example, leading to having no primary for a few seconds) can eventually go away, so client should retry the operation if it was doing reads or multiple-safe writes, while permanent error (protocol violation, database corruption) would never go away and should be immediately signaled to the client.
Currently, every driver and client have to find thier own set of errors (experimentally, by simulating failure) that "can be retried" to ensure smooth operation in the face of hardware/software failure. Adding the proposed "transient" flag (or any other mechanism, this proposal doesn't pretend to be ideal) along with supporting it in the existing driver code, probably even with auto-retry, ensuring transparent reads for failures if enabled by user, would greatly improve harware failure resilience of client-side code.