[DRIVERS-2456] Clarify default serverSelectionTimeoutMS for mongocryptd client Created: 29/Sep/22  Updated: 11/Oct/22

Status: Backlog
Project: Drivers
Component/s: Client Side Encryption
Fix Version/s: None

Type: Task Priority: Unknown
Reporter: Kevin Albertson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Driver Changes: Needed

 Description   

 

Summary

Clarify the behavior of applying the default serverSelectionTimeoutMS to the MongoClient to mongocryptd.

Consider making the behavior:

  • If extraOptions.mongocryptdURI includes serverSelectionTimeoutMS, use it.
  • Otherwise, set serverSelectionTimeoutMS=10000.

Motivation

The Client Side Encryption specification says:

Upon construction, the MongoClient MUST create a MongoClient to mongocryptd configured with serverSelectionTimeoutMS=10000.

This prose test assumes serverSelectionTimeoutMS may be overridden by setting in the extraOptions.mongocryptdURI:

"mongocryptdURI": "mongodb://localhost:27021/db?serverSelectionTimeoutMS=1000",

Behavior differs between drivers:

IMO the least surprising behavior is:

  • If extraOptions.mongocryptdURI includes serverSelectionTimeoutMS, use it.
  • Otherwise, set serverSelectionTimeoutMS=10000.

This may be a minor breaking behavior change in some drivers.

Who is the affected end user?

Users of CSFLE that are not using the crypt_shared library.

How does this affect the end user?

The serverSelectionTimeoutMS may not be configurable to mongocryptd.

How likely is it that this problem or use case will occur?

I am not aware of any users encountered related problems.

If the problem does occur, what are the consequences and how severe are they?

Possible problematic connection to mongocryptd.

Is this issue urgent?

No.

Is this ticket required by a downstream team?

No.

Is this ticket only for tests?

No.


Generated at Thu Feb 08 08:25:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.