Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2456

Clarify default serverSelectionTimeoutMS for mongocryptd client

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Component/s: Client Side Encryption
    • None
    • Needed

       

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: