<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:38:03 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>[GODRIVER-2205] Empty read preference tag sets are incorrectly skipped during command construction</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2205</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;When creating read preference documents for commands, the driver skips empty tag sets &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/63855571587c4e7c7ba556410df182b3019208d6/x/mongo/driver/operation.go#L1237&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;. However, per the server selection &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#tag_sets&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;spec&lt;/a&gt;, an empty tag set is semantically important:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;A tag set that is an empty document matches any server, because the empty tag set is a subset of any tag set. This means the default&#160;&lt;tt&gt;tag_sets&lt;/tt&gt;&#160;parameter (&lt;tt&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;{}&amp;#93;&lt;/span&gt;&lt;/tt&gt;) matches all servers.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Empty tag sets can be used as a fallback to match any server if previous tag sets did not match. The driver&apos;s skip behavior causes issues when connected to sharded clusters because the empty tag set will not be included in the $readPreference document, so the mongos will return a FailedToSatisfyReadPreference error if no servers matched the previous sets.&lt;/p&gt;

&lt;p&gt;I&apos;ve attached Go and Python versions of a script that demonstrates this issue. If connected to a sharded cluster with a mongos running on localhost:27017, the Go script fails and the Python one succeeds.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1908532">GODRIVER-2205</key>
            <summary>Empty read preference tag sets are incorrectly skipped during command construction</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="13201">Fixed</resolution>
                                        <assignee username="matt.dale@mongodb.com">Matt Dale</assignee>
                                    <reporter username="divjot.arora@mongodb.com">Divjot Arora</reporter>
                        <labels>
                    </labels>
                <created>Mon, 25 Oct 2021 16:52:07 +0000</created>
                <updated>Sat, 28 Oct 2023 11:37:42 +0000</updated>
                            <resolved>Mon, 1 Nov 2021 18:07:03 +0000</resolved>
                                                    <fixVersion>1.7.4</fixVersion>
                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="4161278" author="xgen-internal-githook" created="Mon, 1 Nov 2021 18:05:41 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matt Dale&apos;, &apos;email&apos;: &apos;9760375+matthewdale@users.noreply.github.com&apos;, &apos;username&apos;: &apos;matthewdale&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2205&quot; title=&quot;Empty read preference tag sets are incorrectly skipped during command construction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2205&quot;&gt;&lt;del&gt;GODRIVER-2205&lt;/del&gt;&lt;/a&gt; Retain empty tag sets when building a read preference document. (#787)&lt;br/&gt;
Branch: release/1.7&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/b1763dbc706250852447d6729e1b93bb3c8a9f58&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/b1763dbc706250852447d6729e1b93bb3c8a9f58&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4161272" author="xgen-internal-githook" created="Mon, 1 Nov 2021 18:04:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matt Dale&apos;, &apos;email&apos;: &apos;9760375+matthewdale@users.noreply.github.com&apos;, &apos;username&apos;: &apos;matthewdale&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2205&quot; title=&quot;Empty read preference tag sets are incorrectly skipped during command construction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2205&quot;&gt;&lt;del&gt;GODRIVER-2205&lt;/del&gt;&lt;/a&gt; Retain empty tag sets when building a read preference document. (#787)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/34dde800748e03c76c46fbdbb54ea1c5a26b32c9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/34dde800748e03c76c46fbdbb54ea1c5a26b32c9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4158597" author="JIRAUSER1259527" created="Sat, 30 Oct 2021 00:15:57 +0000"  >&lt;p&gt;PR: &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/pull/787&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/pull/787&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1981644">GODRIVER-2305</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="342180" name="main.go" size="1302" author="divjot.arora@mongodb.com" created="Mon, 25 Oct 2021 16:52:00 +0000"/>
                            <attachment id="342179" name="main.py" size="394" author="divjot.arora@mongodb.com" created="Mon, 25 Oct 2021 16:52:05 +0000"/>
                    </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|huj83j:</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>