Skip to content
New issue

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

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

Already on GitHub? # to your account

(Experimental) Add UnsafeAllowSeperateMaxTimeMSWithCSOT #1941

Draft
wants to merge 5 commits into
base: v1
Choose a base branch
from

Conversation

prestonvasquez
Copy link
Member

@prestonvasquez prestonvasquez commented Feb 14, 2025

Summary

Add an experimental bool to enabled legacy timeout behavior while CSOT is enabled (client.Timeout. >=0). This would make context deadline only applicable to client-side blocking logic and specify MaxTime on the as a server-side timeout.

This is only available for findOne and has to be set directly on the FindOneOptions:

opts := options.FindOne()
opts.UnsafeAllowSeperateMaxTimeMS = true 

_ = coll.FindOne(context.TODO(), bson.D{}, opts)

Background & Motivation

@prestonvasquez prestonvasquez changed the title Add UnsafeAllowSeperateMaxTimeMSWithCSOT (POC) Add UnsafeAllowSeperateMaxTimeMSWithCSOT Feb 14, 2025
@mongodb-drivers-pr-bot mongodb-drivers-pr-bot bot added the priority-3-low Low Priority PR for Review label Feb 14, 2025
Copy link
Contributor

mongodb-drivers-pr-bot bot commented Feb 14, 2025

API Change Report

./mongo/options

compatible changes

FindOneOptions.UnsafeAllowSeperateMaxTimeMS: added

./x/mongo/driver

compatible changes

Operation.UnsafeAllowSeperateMaxTimeMS: added

./x/mongo/driver/operation

compatible changes

(*Find).UnsafeAllowSeperateMaxTimeMS: added

@prestonvasquez prestonvasquez changed the title (POC) Add UnsafeAllowSeperateMaxTimeMSWithCSOT (Experimental Behavior) Add UnsafeAllowSeperateMaxTimeMSWithCSOT Feb 14, 2025
@prestonvasquez prestonvasquez changed the title (Experimental Behavior) Add UnsafeAllowSeperateMaxTimeMSWithCSOT (Experimental) Add UnsafeAllowSeperateMaxTimeMSWithCSOT Feb 14, 2025
# for free to join this conversation on GitHub. Already have an account? # 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