<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:09:33 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>[SERVER-25561] Backwards compatibility issues when sending linearizable reads to multiversion sharding cluster</title>
                <link>https://jira.mongodb.org/browse/SERVER-25561</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;If a linearizable read in a sharded cluster targets multiple shards (we do not disallow this even though linearizability cannot be guaranteed on more than 1 document), one of which is a replica set updated to 3.4 and another is only on version 3.2, the linearizable read command might succeed on the 3.4 set and return linearizable read not supported on the 3.2 set. We need to make sure mongos knows how to respond to this situation.&lt;/p&gt;</description>
                <environment></environment>
        <key id="308311">SERVER-25561</key>
            <summary>Backwards compatibility issues when sending linearizable reads to multiversion sharding cluster</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="9">Done</resolution>
                                        <assignee username="william.schultz@mongodb.com">William Schultz</assignee>
                                    <reporter username="hari.devaraj">Hari Devaraj</reporter>
                        <labels>
                    </labels>
                <created>Thu, 11 Aug 2016 15:51:57 +0000</created>
                <updated>Fri, 11 Nov 2016 00:04:17 +0000</updated>
                            <resolved>Thu, 10 Nov 2016 23:56:53 +0000</resolved>
                                                                    <component>Replication</component>
                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1431615" author="spencer" created="Thu, 10 Nov 2016 23:58:09 +0000"  >&lt;p&gt;It is illegal to issue a linearizable read that targets multiple documents, and if the query hits a 3.2 shard it correctly reports that the read concern isn&apos;t recognized.&lt;/p&gt;</comment>
                            <comment id="1431197" author="william.schultz" created="Thu, 10 Nov 2016 16:47:29 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=spencer&quot; class=&quot;user-hover&quot; rel=&quot;spencer&quot;&gt;spencer&lt;/a&gt;  Investigation results with a couple of sharded cluster configurations. It seems that any queries which target a 3.2 shard will return the error messages shown below when specifying linearizable readConcern. The JS test script used to obtain these results is attached (variable values can be tweaked).&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;em&gt;General Configuration&lt;/em&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;2 shards, 1 mongos&lt;br/&gt;
&quot;test.user&quot; collection with documents { x : &lt;span class=&quot;error&quot;&gt;&amp;#91;1...1000&amp;#93;&lt;/span&gt;, name: &quot;test&quot; }&lt;br/&gt;
shardkey: &quot;x&quot;, &lt;br/&gt;
shard1 key range: {x:1}...{x:500}  &lt;br/&gt;
shard2 key range: {x:501}...{x:1000} &lt;/p&gt;


&lt;p&gt;&lt;b&gt;Configuration A&lt;/b&gt;&lt;br/&gt;
mongos: v3.2&lt;br/&gt;
shard1: v3.2&lt;br/&gt;
shard2: v3.4&lt;/p&gt;

&lt;p&gt;Query 1: &lt;tt&gt;testDB.user.find({}).readConcern(&quot;linearizable&quot;).maxTimeMS(5000)&lt;/tt&gt;&lt;br/&gt;
Response 1:{{Error: error: {&quot;ok&quot; : 0, &quot;errmsg&quot; : &quot;readConcern.level must be either &apos;local&apos; or &apos;majority&apos;&quot;, &quot;code&quot; : 9 }}}&lt;/p&gt;

&lt;p&gt;Query 2: &lt;tt&gt;testDB.user.find({x:1}).readConcern(&quot;linearizable&quot;).maxTimeMS(5000)&lt;/tt&gt;&lt;br/&gt;
Response 2:  Error: error: { &quot;ok&quot; : 0, &quot;errmsg&quot; : &quot;readConcern.level must be either &apos;local&apos; or &apos;majority&apos;&quot;, &quot;code&quot; : 9 }&lt;/p&gt;

&lt;p&gt;Query 3: &lt;tt&gt;testDB.user.find({x:750}).readConcern(&quot;linearizable&quot;).maxTimeMS(5000)&lt;/tt&gt;&lt;br/&gt;
Response 3 (first doc of cursor): { &quot;_id&quot; : ObjectId(&quot;5824a830a58daf50ae382d7c&quot;), &quot;x&quot; : 750, &quot;name&quot; : &quot;test&quot; }&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Configuration B&lt;/b&gt;&lt;br/&gt;
mongos: v3.4&lt;br/&gt;
shard1: v3.4&lt;br/&gt;
shard2: v3.4&lt;/p&gt;

&lt;p&gt;Query 1: &lt;tt&gt;testDB.user.find({}).readConcern(&quot;linearizable&quot;).maxTimeMS(5000)&lt;/tt&gt;&lt;br/&gt;
Response 1 (first doc of cursor): { &quot;_id&quot; : ObjectId(&quot;5824a969320116512382f733&quot;), &quot;x&quot; : 1, &quot;name&quot; : &quot;test&quot; }&lt;/p&gt;

&lt;p&gt;Query 2: &lt;tt&gt;testDB.user.find({x:1}).readConcern(&quot;linearizable&quot;).maxTimeMS(5000)&lt;/tt&gt;&lt;br/&gt;
Response 2 (first doc of cursor): {{ { _id : ObjectId5824aa8626ac951c5b95adc6, &quot;x&quot; : 1, &quot;name&quot; : &quot;test&quot; } }}&lt;/p&gt;

&lt;p&gt;Query 3: &lt;tt&gt;testDB.user.find({x:750}).readConcern(&quot;linearizable&quot;).maxTimeMS(5000)&lt;/tt&gt;&lt;br/&gt;
Response 3 (first doc of cursor): { &quot;_id&quot; : ObjectId(&quot;5824aaf86bcf288abd7da99b&quot;), &quot;x&quot; : 750, &quot;name&quot; : &quot;test&quot; }&lt;/p&gt;</comment>
                            <comment id="1419343" author="milkie" created="Thu, 27 Oct 2016 12:38:29 +0000"  >&lt;p&gt;But using a limit of 1 isn&apos;t going to ensure that you are using it correctly.  Instead, it would force people to manually insert a limit where it actually isn&apos;t necessary.  All that is necessary is that the query specification uniquely identifies one document, based on the properties of the collection you are querying.&lt;/p&gt;</comment>
                            <comment id="1418909" author="spencer" created="Wed, 26 Oct 2016 21:47:15 +0000"  >&lt;p&gt;Isn&apos;t the real fix to not allow linearizable reads unless the query&apos;s limit is 1?  Linearizable reads don&apos;t work properly for multi-document reads, so we should disallow them.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="292731">SERVER-24498</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="143985" name="linearizable_shard_read.js" size="2506" author="william.schultz@mongodb.com" created="Thu, 10 Nov 2016 18:17:40 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 24 Aug 2016 17:36:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 13 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-173</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>spencer@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 13 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>hari.devaraj</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
            <customfieldvalue>william.schultz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrjzav:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsomhb:</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>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1310">Repl 2016-11-21</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hseocv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>