ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Duplicate
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      tadjik1 has created PR #2330: GODRIVER-3646 Implement backpressure error labels for connection establishment in mongo-go-driver

      Issue Text:
      <!--- If applicable, issue number goes here, e.g. GODRIVER-ABCD -->

      GODRIVER-3646(https://jira.mongodb.org/browse/GODRIVER-3646)

        1. Summary

      <!--- A summary of the changes proposed by this pull request. -->

      Implements client-side backpressure error handling for connection establishment, as specified in the CMAP and SDAM specification updates.

      When a connection fails during dial, TLS handshake, or the initial `hello`, the driver labels the error with `SystemOverloadedError` and `RetryableError`. The SDAM error handler checks for these labels and skips pool clearing (alongside with server description updates), preventing connection churn when the server is under load.

      Per spec, backpressure labels are NOT applied to DNS lookup failures, non-I/O TLS errors (certificate validation, hostname mismatch, etc.), or authentication errors.

        1. Background & Motivation

      <!--- Rationale for the pull request. -->

      When server enables ingress connection rate limiting, it may reject new connections during periods of high load. Previously, the driver treated these rejections like any other network error - marking the server `Unknown` and clearing the connection pool. This triggered a destructive cycle: clearing the pool forced new connection attempts, which were also rejected, leading to repeated pool clears and degraded availability.
      The specification introduced backpressure errors labels to break this cycle: errrors during connection establishment (before authentication) are labeled that they may be caused by transient server overload, not an actual server state change.

        1. Notes for reviewers

            Assignee:
            Unassigned
            Reporter:
            TPM Jira Automations Bot
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: