<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:20: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>[SERVER-29158] make ShardLocal::_runCommand support read after opTime</title>
                <link>https://jira.mongodb.org/browse/SERVER-29158</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Unlike&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;ShardLocal::_exhaustiveFindOnConfig, which ensures read after opTime behavior by &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.5.6/src/mongo/s/client/shard_local.cpp#L159-L178&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;waiting for the last opTime for the Client to be committed&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;ShardRemote::_exhaustiveFindOnConfig, which &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.5.6/src/mongo/s/client/shard_remote.cpp#L305-L313&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sends Grid&apos;s configOpTime in the readConcern of its requests to the config server&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;ShardRemote::_runCommand, whose callers &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.5.6/src/mongo/s/catalog/sharding_catalog_client_impl.cpp#L1792-L1796&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;manually attach the Grid&apos;s configOpTime for read commands&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;ShardLocal::_runCommand does not do anything to ensure read after opTime.&lt;/p&gt;

&lt;p&gt;This ticket is to separate the read after opTime behavior in ShardLocal::_exhaustiveFindOnConfig into an ensureReadAfterOpTime() function and call it in both ShardLocal::_exhaustiveFindOnConfig and ShardLocal::_runCommand.&lt;/p&gt;

&lt;p&gt;This is to support moving metadata commands to the config server which use runCommand to do (non-cursor-generating) reads, such as counts.&lt;/p&gt;</description>
                <environment></environment>
        <key id="383001">SERVER-29158</key>
            <summary>make ShardLocal::_runCommand support read after opTime</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="esha.maharishi@mongodb.com">Esha Maharishi</assignee>
                                    <reporter username="esha.maharishi@mongodb.com">Esha Maharishi</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 May 2017 15:32:10 +0000</created>
                <updated>Thu, 1 Jun 2017 22:24:48 +0000</updated>
                            <resolved>Thu, 1 Jun 2017 22:19:41 +0000</resolved>
                                    <version>3.5.6</version>
                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1585481" author="esha.maharishi@10gen.com" created="Thu, 1 Jun 2017 22:19:20 +0000"  >&lt;p&gt;Setting reading from the majority committed snapshot in ShardLocal::_runCommand proves difficult because _runCommand can be used for writes with a local writeConcern during transition to primary. Such writes fail with a WriteConflictException if reading from the majority committed snapshot is set.&lt;/p&gt;

&lt;p&gt;So, it isn&apos;t really possible to enforce readConcern for non-find reads through ShardLocal without dividing ShardLocal::_runCommand into two functions, one for read commands and one for write commands, which is arduous at the moment.&lt;/p&gt;

&lt;p&gt;This ticket was meant to enable &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-29107&quot; title=&quot;move shardCollection logic into new _configsvrShardCollection command on config server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-29107&quot;&gt;&lt;del&gt;SERVER-29107&lt;/del&gt;&lt;/a&gt;, where we need to do a read (in this case, a count) through ShardLocal::_runCommand for the first time as part of moving shardCollection from mongos to the config server.&lt;/p&gt;

&lt;p&gt;Instead of using readAfterOpTime with readConcern majority, I will use readConcern local. This way, the shardCollection command may fail when it doesn&apos;t need to (when it sees writes that will get rolled back), but it will never succeed when it shouldn&apos;t (if the chunks will become committed, they will definitely be seen by using readConcern local).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="381911">SERVER-29107</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 36 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-696</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>esha.maharishi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 36 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht7c2v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hralgf:</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="1704">Sharding 2017-05-29</customfieldvalue>
    <customfieldvalue id="1705">Sharding 2017-06-19</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|hsalrj:</customfieldvalue>

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