Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(POC) GODRIVER-3444 Adjust getMore maxTimeMS Calculation for tailable awaitData Cursors #1925

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

prestonvasquez
Copy link
Collaborator

@prestonvasquez prestonvasquez commented Jan 29, 2025

GODRIVER-3444

Summary

If maxAwaitTime option is set, use the min(maxAwaitTimeMS, remaining timeoutMS) as the maxTimeMS field on getMore commands.

Background & Motivation

From the DRIVERS-2868 proposal:

For tailable awaitData cursors we use the min(maxAwaitTimeMS, remaining timeoutMS - minRoundTripTime) to allow the server more opportunities to respond with an empty batch before a client-side timeout. Additionally, this change is
required to prevent an unnecessary client-side timeout during a pending read when checking out a connection. For
example, maxAwaitTimeMS=1000 and remaining timeoutMS=100 will cause a pending read to hang for 900ms.

Copy link
Contributor

mongodb-drivers-pr-bot bot commented Jan 29, 2025

API Change Report

No changes found!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-3-low Low Priority PR for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant