Support the overload retry policy for the commands that are not retryable under the read/write retry policy

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • backpressure-1.0
    • Affects Version/s: backpressure-1.0
    • Component/s: Backpressure
    • None
    • Java Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      The Client Backpressure specification expands the driver's overload retry policy to all commands, including those that are not eligible for retry under the read/write retry policies.

      Today, a set of write-command operations dispatch their server command with no retry wrapper at all, so a server SystemOverloadedError on these commands is surfaced immediately instead of being retried with backoff.

      The authoritative list of affected commands comes from:

      Peer drivers have already implemented this:

      • PyMongo retries all of these gated on retry_writes (including the search-index ops).
      • Node retries all except the search-index ops.

      Scope

      Add overload-only retry, composed via

      SpecRetryPolicy.IndividualPolicies(retryWrites)
              .includeOverload(maxAdaptiveRetries, AS_WRITE_POLICY)
      

      to the following operations, gated on the client retryWrites setting:

      • createIndexes
      • dropIndexes
      • createCollection
      • createView
      • dropCollection
      • dropDatabase
      • renameCollection
      • aggregate with $out / $merge
      • createSearchIndexes, updateSearchIndex, dropSearchIndex

      Overload-only (not includeWrite()) because these commands are ineligible for write retry - no txnNumber / retryable-writes semantics should be added.

      Non-goals

      • mapReduce (inline and to-collection) — deprecated in the driver, removed from MongoDB 5.0 and PyMongo; excluded.
      • Unacknowledged w:0 writes - no response carries an overload error.
      • runCommand (JAVA-6294), getMore (JAVA-6296), multi-doc update / delete - already overload-retried.
      • killCursors overload retry - tracked separately.

      Acceptance criteria 

      1. All affected operations overload-retry up to maxAdaptiveRetries times when the server returns SystemOverloadedError + RetryableError, gated on retryWrites.
      2. No retry when retryWrites=false or on non-overload errors.
      3. The 8 previously JAVA-5956-skipped unified client-backpressure scenarios (createIndex / dropIndex / dropIndexes / aggregate-write) pass for both sync and reactive drivers.
      4. Prose tests cover the operations that lack unified coverage (admin / index / search-index commands).

            Assignee:
            Slav Babanin
            Reporter:
            Slav Babanin
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: