[DRIVERS-2108] Clarify the precedence and scope of options resolved from TXT records Created: 05/Sep/19  Updated: 31/Mar/22

Status: Backlog
Project: Drivers
Component/s: Initial DNS Seedlist Discovery
Fix Version/s: None

Type: Spec Change Priority: Major - P3
Reporter: Daniel Aprahamian (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
Driver Changes: Needed

 Description   

As part of initial seedlist and discovery, drivers are required to query TXT records for certain default options. Because of the requirement that the MongoClient constructor perform no I/O, this can, at worst, defer the processing of URI and user options until the first instance of I/O on the MongoClient. Further complicating this is that any userDefined options specified locally must override the TXT record options.

For example: the authSource is currently an option that can be set in the TXT record. Because of this:

1. A driver cannot be fully aware of the credentials of the user until I/O is performed.
2. A driver needs to track awareness of whether or not the current value of authSource is a user specified value or a default value.

I believe some drivers get around this problem by performing the TXT lookup during MongoClient construction.

We should clarify:

1. Can drivers perform TXT lookup during MongoClient construction
2. Must drivers assume that any option in the future can be set via TXT record?



 Comments   
Comment by Daniel Aprahamian (Inactive) [ 28/Oct/19 ]

jeff.yemin yes, that definitely addresses concern #1. I think it would still be nice to clarify how fearful we should be of future options being set via TXT records, as it may inform the choice of a driver to do TXT lookup in the constructor. For example, if we think we will support more options from TXT records, it might be a good idea to go even further and say that Drivers SHOULD do a TXT lookup in the constructor / ASAP.

Comment by Jeffrey Yemin [ 28/Oct/19 ]

daniel.aprahamian, does the recent change from https://github.com/mongodb/specifications/commit/17ce7db5f402dac174d962092e08b366cb6aa54c address some or all of your concerns?

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