Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-2400

Differentiating transient from permanent erros

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            onyxmaster Aristarkh Zagorodnikov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: