GODRIVER-4062 Remove the ServerOverloadedError retry example. by matthewdale · Pull Request #2568 · mongodb/mongo-go-driver · GitHub
Skip to content

GODRIVER-4062 Remove the ServerOverloadedError retry example. - #2568

Merged
prestonvasquez merged 2 commits into
mongodb:masterfrom
matthewdale:godriver4062-backoff-ex
Sep 2, 2026
Merged

prestonvasquez merged 2 commits into
mongodb:masterfrom
matthewdale:godriver4062-backoff-ex

Conversation

@matthewdale

@matthewdale matthewdale commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

GODRIVER-4062

Summary

Remove the ServerOverloadedError retry example.

Background & Motivation

Move the example to the Go Driver docs site to prevent confusion about whether or not the Go Driver natively supports the new server IWM backoff behavior.

@github-actions github-actions Bot added the documentation Pull requests that update documentation or examples label Aug 28, 2026
@mongodb-drivers-pr-bot

mongodb-drivers-pr-bot Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

@matthewdale
matthewdale force-pushed the godriver4062-backoff-ex branch from 0e44ef1 to 49dc0e9 Compare August 28, 2026 07:28
@mongodb-drivers-pr-bot

Copy link
Copy Markdown
Contributor

@matthewdale
matthewdale marked this pull request as ready for review August 28, 2026 07:34
@matthewdale
matthewdale requested a review from a team as a code owner August 28, 2026 07:34
@matthewdale
matthewdale requested review from prestonvasquez and a lite review from Copilot August 28, 2026 07:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the examples/overload_error retry logic to incorporate MongoDB 9.0’s server-provided baseBackoffMS value for SystemOverloadedError retries, demonstrating how clients can start exponential backoff from a server-recommended baseline.

Changes:

  • Added parsing for baseBackoffMS from command errors and write concern errors to derive a server-provided base backoff.
  • Refactored retry delay calculation into helper functions for exponential backoff and jitter.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread examples/overload_error/overload_error.go Outdated
@matthewdale matthewdale added the review-priority-normal Medium Priority PR for Review: within 1 business day label Aug 28, 2026
Comment thread examples/overload_error/overload_error.go Outdated
@matthewdale matthewdale changed the title GODRIVER-4062 Update ServerOverloadedError retry example to use baseBackoffMS. GODRIVER-4062 Remove the ServerOverloadedError retry example. Sep 1, 2026
@prestonvasquez
prestonvasquez enabled auto-merge (squash) September 2, 2026 21:59
@prestonvasquez
prestonvasquez merged commit 4fe3377 into mongodb:master Sep 2, 2026
36 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Pull requests that update documentation or examples review-priority-normal Medium Priority PR for Review: within 1 business day

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants