<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:34:19 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-33710] Support readConcern snapshot with atClusterTime in cluster distinct command</title>
                <link>https://jira.mongodb.org/browse/SERVER-33710</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;As part of this ticket:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Ensure ClusterDistinct supports readConcern level snapshot&lt;/li&gt;
	&lt;li&gt;Ensure ClusterDistinct selects an appropriate atClusterTime based on the shards it targets, and will retry on snapshot errors&lt;/li&gt;
	&lt;li&gt;Add unit tests verifying this works&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Proposed implementation:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Add a supportsReadConcern to ClusterDistinct that always returns true&lt;/li&gt;
	&lt;li&gt;Update functions in &lt;tt&gt;cluster_commands_helpers.cpp&lt;/tt&gt; to compute atClusterTime and attach it to the generated responses, like in ClusterAggregate (computing atClusterTime &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ed055ca17c3ce216ccd7ad12b6bc3f7fa27e6e50/src/mongo/s/commands/cluster_aggregate.cpp#L404-L407&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;with computeAtClusterTime&lt;/a&gt;, attaching atClusterTime &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ed055ca17c3ce216ccd7ad12b6bc3f7fa27e6e50/src/mongo/s/commands/cluster_aggregate.cpp#L242&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;with appendAtClusterTime&lt;/a&gt;)
	&lt;ul&gt;
		&lt;li&gt;buildVersionedRequestsForTargetedShards &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ed055ca17c/src/mongo/s/commands/cluster_commands_helpers.cpp#L102&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;buildUnversionedRequestsForShards &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ed055ca17c/src/mongo/s/commands/cluster_commands_helpers.cpp#L102&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;snapshot errors are &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ed055ca17c/src/mongo/s/commands/strategy.cpp#L414-L420&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;already retried in strategy.cpp&lt;/a&gt;, so there should be no work there&lt;/li&gt;
	&lt;li&gt;Add unit test verify requests sent by ClusterDistinct contain appropriate atClusterTimes and are retried on snapshot errors, like the existing &lt;a href=&quot;https://github.com/mongodb/mongo/blob/ed055ca17c/src/mongo/s/query/cluster_find_test.cpp&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ClusterFind tests&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
        <key id="506649">SERVER-33710</key>
            <summary>Support readConcern snapshot with atClusterTime in cluster distinct command</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="13201">Fixed</resolution>
                                        <assignee username="cheahuychou.mao@mongodb.com">Cheahuychou Mao</assignee>
                                    <reporter username="misha.tyulenev@mongodb.com">Misha Tyulenev</reporter>
                        <labels>
                            <label>ShardedTxn:GlobalSnapshot</label>
                    </labels>
                <created>Tue, 6 Mar 2018 21:02:35 +0000</created>
                <updated>Sun, 29 Oct 2023 22:34:03 +0000</updated>
                            <resolved>Wed, 8 Aug 2018 17:46:19 +0000</resolved>
                                                    <fixVersion>4.1.2</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1970598" author="xgen-internal-githook" created="Wed, 8 Aug 2018 17:44:00 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;cheahuychou&apos;, &apos;name&apos;: &apos;Cheahuychou Mao&apos;, &apos;email&apos;: &apos;cheahuychou.mao@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33710&quot; title=&quot;Support readConcern snapshot with atClusterTime in cluster distinct command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33710&quot;&gt;&lt;del&gt;SERVER-33710&lt;/del&gt;&lt;/a&gt; Support readConcern snapshot with atClusterTime in cluster distinct command&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/957f2abc510016546a577e639b2bfabb182c4e17&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/957f2abc510016546a577e639b2bfabb182c4e17&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1963456" author="misha.tyulenev" created="Wed, 1 Aug 2018 20:59:57 +0000"  >&lt;p&gt;lgtm&lt;/p&gt;</comment>
                            <comment id="1963363" author="esha.maharishi@10gen.com" created="Wed, 1 Aug 2018 19:49:19 +0000"  >&lt;p&gt;Thanks, lgtm.&lt;/p&gt;</comment>
                            <comment id="1963323" author="jack.mulrow" created="Wed, 1 Aug 2018 19:27:48 +0000"  >&lt;blockquote&gt;
&lt;p&gt;It seems like mongos&apos;s distinct already supports readConcern (as it should, since it&apos;s a read command). Is there something more to do?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;No, we shouldn&apos;t have to do anything then.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It would be nice to avoid calling these in each command path. Is there a way we can place these calls above (in the service entry point) or below (in the ShardingTaskExecutor) the Command&apos;s run()? Will we try to reorganize the code to be able to do that under&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36237&quot; title=&quot;Integrate atClusterTime selection on mongos with RouterSession&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36237&quot;&gt;&lt;del&gt;SERVER-36237&lt;/del&gt;&lt;/a&gt;, and if so, should we block this ticket on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36237&quot; title=&quot;Integrate atClusterTime selection on mongos with RouterSession&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36237&quot;&gt;&lt;del&gt;SERVER-36237&lt;/del&gt;&lt;/a&gt;?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Like we talked about offline, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36237&quot; title=&quot;Integrate atClusterTime selection on mongos with RouterSession&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36237&quot;&gt;&lt;del&gt;SERVER-36237&lt;/del&gt;&lt;/a&gt; will include refactoring how we attach atClusterTime to outgoing requests, but since we&apos;ll still have to compute atClusterTime in the targeting layer and need test coverage for distinct, the changes here will just be a small addition to the refactor, so there&apos;s no need to block this on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36237&quot; title=&quot;Integrate atClusterTime selection on mongos with RouterSession&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36237&quot;&gt;&lt;del&gt;SERVER-36237&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1963267" author="esha.maharishi@10gen.com" created="Wed, 1 Aug 2018 18:44:00 +0000"  >&lt;p&gt;Looks good, two questions:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;font color=&quot;#707070&quot;&gt;1. Add a supportsReadConcern to ClusterDistinct that always returns true&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;It seems like &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.1.1/src/mongo/s/commands/cluster_distinct_cmd.cpp#L72-L76&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongos&apos;s distinct already supports readConcern&lt;/a&gt;&#160;(as it should, since it&apos;s a read command). Is there something more to do?&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;2. Update functions in&#160;&lt;tt&gt;cluster_commands_helpers.cpp&lt;/tt&gt;&#160;to compute atClusterTime and attach it to the generated responses, like in ClusterAggregate (computing atClusterTime&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/ed055ca17c/src/mongo/s/query/cluster_find_test.cpp&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;with computeAtClusterTime&lt;/a&gt;, attaching atClusterTime&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/ed055ca17c/src/mongo/s/query/cluster_find_test.cpp&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;with appendAtClusterTime&lt;/a&gt;)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;It would be nice to avoid calling these in each command path. Is there a way we can place these calls above (in the service entry point) or below (in the ShardingTaskExecutor) the Command&apos;s run()? Will we try to reorganize the code to be able to do that under&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36237&quot; title=&quot;Integrate atClusterTime selection on mongos with RouterSession&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36237&quot;&gt;&lt;del&gt;SERVER-36237&lt;/del&gt;&lt;/a&gt;, and if so, should we block this ticket on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36237&quot; title=&quot;Integrate atClusterTime selection on mongos with RouterSession&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36237&quot;&gt;&lt;del&gt;SERVER-36237&lt;/del&gt;&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="1962983" author="jack.mulrow" created="Wed, 1 Aug 2018 16:05:54 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=misha.tyulenev&quot; class=&quot;user-hover&quot; rel=&quot;misha.tyulenev&quot;&gt;misha.tyulenev&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=esha.maharishi&quot; class=&quot;user-hover&quot; rel=&quot;esha.maharishi&quot;&gt;esha.maharishi&lt;/a&gt;, can you guys review the proposed implementation above?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                        <issuelink>
            <issuekey id="587612">DOCS-11964</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>6.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_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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 1 Aug 2018 16:05:54 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 27 weeks 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-834</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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 27 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>cheahuychou.mao@mongodb.com</customfieldvalue>
            <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jack.mulrow@mongodb.com</customfieldvalue>
            <customfieldvalue>misha.tyulenev@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htrv9r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8ojj:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="2451">Sharding 2018-08-13</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|htrhg7:</customfieldvalue>

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