<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:17:43 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CDRIVER-3328] Provide a way to access the URI updated with TXT records from a mongoc_client_t</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-3328</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;When a user uses creates a &lt;tt&gt;mongoc_client_t&lt;/tt&gt; via a URI that specifies values via TXT record, the URI stored on the &lt;tt&gt;mongoc_client_t&lt;/tt&gt; is not updated according to the records &amp;#8211; per &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/06f1fb80d3db6cf24df79b3e124e3ea68e6ad2f1/src/libmongoc/tests/test-mongoc-dns.c#L33&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this line&lt;/a&gt; in the DNS tests it appears only the topology&apos;s copy is.&lt;/p&gt;

&lt;p&gt;Since the topology is not publicly accessible, this makes it impossible for the Swift driver to e.g. get an accurate picture of the options set on a URI or to fully implement the initial DNS seedlist discovery spec tests.&lt;/p&gt;</description>
                <environment></environment>
        <key id="902753">CDRIVER-3328</key>
            <summary>Provide a way to access the URI updated with TXT records from a mongoc_client_t</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13202">Works as Designed</resolution>
                                        <assignee username="kevin.albertson@mongodb.com">Kevin Albertson</assignee>
                                    <reporter username="kaitlin.mahar@mongodb.com">Kaitlin Mahar</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Aug 2019 15:49:43 +0000</created>
                <updated>Fri, 27 Oct 2023 13:14:11 +0000</updated>
                            <resolved>Tue, 14 Jan 2020 22:04:26 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2724980" author="xgen-internal-githook" created="Tue, 14 Jan 2020 18:43:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Kevin Albertson&apos;, &apos;email&apos;: &apos;kevin.albertson@mongodb.com&apos;, &apos;username&apos;: &apos;kevinAlbs&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3328&quot; title=&quot;Provide a way to access the URI updated with TXT records from a mongoc_client_t&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3328&quot;&gt;&lt;del&gt;CDRIVER-3328&lt;/del&gt;&lt;/a&gt; fixup DNS test&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/a59aec4acf349c3785dc6050ceda4b93be86d976&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/a59aec4acf349c3785dc6050ceda4b93be86d976&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2719248" author="kaitlin.mahar" created="Fri, 10 Jan 2020 19:17:01 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kevin.albertson&quot; class=&quot;user-hover&quot; rel=&quot;kevin.albertson&quot;&gt;kevin.albertson&lt;/a&gt; Testing this out, I do see values that are only provided via TXT are showing up when I call the corresponding getters on the URI. I thought I had actually tested that before to confirm they did not show up, but apparently not. Thanks for looking into this!&lt;/p&gt;</comment>
                            <comment id="2719026" author="kevin.albertson" created="Fri, 10 Jan 2020 18:01:28 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kaitlin.mahar&quot; class=&quot;user-hover&quot; rel=&quot;kaitlin.mahar&quot;&gt;kaitlin.mahar&lt;/a&gt; Looking into this, it appears the uri stored on the &lt;tt&gt;mongoc_client_t&lt;/tt&gt; actually is updated after initial seedlist discovery (though it won&apos;t be updated during SRV polling, it should still get the new hosts and options from the initial SRV + TXT requests when constructing a client). The change in &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2425&quot; title=&quot;authSource option from TXT record ignored&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2425&quot;&gt;&lt;del&gt;CDRIVER-2425&lt;/del&gt;&lt;/a&gt; seem to have intended that behavior.&lt;/p&gt;

&lt;p&gt;The comment in the DNS tests seems to be outdated. I&apos;ll update that test shortly. But otherwise, I believe there is no required change here. But let me know if I&apos;m missing something.&lt;/p&gt;</comment>
                            <comment id="2385601" author="kaitlin.mahar" created="Sun, 25 Aug 2019 22:53:00 +0000"  >&lt;p&gt;That would work fine for our purposes.&#160;&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/thumbs_up.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="2384704" author="jmikola@gmail.com" created="Fri, 23 Aug 2019 17:40:06 +0000"  >&lt;p&gt;Is there a particular reason to keep the client&apos;s URI separate from the topology?&lt;/p&gt;

&lt;p&gt;In lieu of introducing a new API, I wonder if we could instead have &lt;tt&gt;mongoc_client_get_uri&lt;/tt&gt; delegate to the topology (assuming that&apos;s always the most up-to-date struct). Is there value in preserving the original URI used to construct the client? If users needed a copy of that, I suppose they could fetch it immediately after creating/popping a client and copy it before it might be updated by SRV polling at a later point.&lt;/p&gt;</comment>
                            <comment id="2383071" author="kaitlin.mahar" created="Thu, 22 Aug 2019 17:43:56 +0000"  >&lt;p&gt;Implementing these tests is the first time we&apos;ve run into a need for this.&lt;/p&gt;

&lt;p&gt;That said, In the future we may provide a similar API to mongoc and allow a user to retrieve a &lt;tt&gt;MongoClient&lt;/tt&gt; &apos;s originating &lt;tt&gt;ConnectionString&lt;/tt&gt;. &lt;br/&gt;
 As a mongoc user, I found it surprising that retrieving a client&apos;s URI and looking up a property on that URI (e.g. replset) could give me a value that is actually incorrect for the client. Without a way to access the resolved URI, we have no choice but to provide that same possibly surprising behavior.&lt;br/&gt;
 We also have SWIFT-501 open about rationalizing which options taken precedence when they are provided in both an options struct and a URI. If there is overlap between options that can be provided via TXT record and via our &lt;tt&gt;ClientOptions&lt;/tt&gt;, that ticket may not be possible to complete if we can&apos;t tell which options are actually set in a URI.&lt;/p&gt;

&lt;p&gt;Regarding the tests, In general, I believe it&apos;s beneficial for us to implement spec tests that check behavior encapsulated within mongoc. We&apos;ve discovered mongoc bugs in the past via our runners that test mongoc logic. For example, change stream resumability is handled by mongoc, but implementing tests for that found &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3329&quot; title=&quot;Driver still tries to resume change streams after encountering NonResumableChangeStreamError&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3329&quot;&gt;&lt;del&gt;CDRIVER-3329&lt;/del&gt;&lt;/a&gt;. I also recall that &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2621&quot; title=&quot;Write concern spec tests not running&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2621&quot;&gt;&lt;del&gt;CDRIVER-2621&lt;/del&gt;&lt;/a&gt; (issues with the read concern / write concern URI spec tests) was caught by our test runner.&lt;/p&gt;</comment>
                            <comment id="2382410" author="kevin.albertson" created="Thu, 22 Aug 2019 12:56:23 +0000"  >&lt;p&gt;Is this only necessary to implement tests in Swift? I don&apos;t know if we&apos;ve added public&#160;API only for the sake of making test assertions for wrapper drivers. Since resolution of SRV/TXT records is contained in libmongoc, perhaps wrapping drivers should not be required to implement these tests?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10020">
                    <name>Gantt Dependency</name>
                                            <outwardlinks description="has to be done before">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="471355">CDRIVER-2425</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hvay07:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>