<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:42:30 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-36240] Make transactions on mongos use snapshot level readConcern if no level was provided</title>
                <link>https://jira.mongodb.org/browse/SERVER-36240</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;If the first statement in a transaction does not specify snapshot readConcern, mongod will implicitly upconvert it to snapshot. Mongos currently does not have this behavior, and because many &lt;tt&gt;core/txns&lt;/tt&gt; tests rely on this, either mongos will need to upconvert readConcerns to snapshot as well (until we support transactions with other readConcern levels) or the tests need to be updated to explicitly choose snapshot readConcern.&lt;/p&gt;</description>
                <environment></environment>
        <key id="575010">SERVER-36240</key>
            <summary>Make transactions on mongos use snapshot level readConcern if no level was provided</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="jack.mulrow@mongodb.com">Jack Mulrow</assignee>
                                    <reporter username="jack.mulrow@mongodb.com">Jack Mulrow</reporter>
                        <labels>
                            <label>ShardedTxn:RouterSupport</label>
                    </labels>
                <created>Mon, 23 Jul 2018 15:20:58 +0000</created>
                <updated>Sun, 29 Oct 2023 22:29:38 +0000</updated>
                            <resolved>Wed, 1 Aug 2018 23:10:15 +0000</resolved>
                                                    <fixVersion>4.1.2</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1963559" author="xgen-internal-githook" created="Wed, 1 Aug 2018 23:01:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jack Mulrow&apos;, &apos;email&apos;: &apos;jack.mulrow@mongodb.com&apos;, &apos;username&apos;: &apos;jsmulrow&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36240&quot; title=&quot;Make transactions on mongos use snapshot level readConcern if no level was provided&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36240&quot;&gt;&lt;del&gt;SERVER-36240&lt;/del&gt;&lt;/a&gt; Make transactions on mongos use snapshot level readConcern if no level was provided&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/be2588ebda13c512cde2d7999a0deebb2531004c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/be2588ebda13c512cde2d7999a0deebb2531004c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1960174" author="renctan" created="Mon, 30 Jul 2018 14:57:13 +0000"  >&lt;p&gt;The current session code does not know anything about the read concern, so the refactor work won&apos;t fix this.&lt;/p&gt;</comment>
                            <comment id="1960151" author="esha.maharishi@10gen.com" created="Mon, 30 Jul 2018 14:49:15 +0000"  >&lt;p&gt;Hmm, I see, it&apos;s literally the &quot;check readConcern, oh hey I need to upconvert&quot; logic that you&apos;re worried about being duplicated. The fact that mongos has to do work because of the resulting upconverted readConcern is orthogonal.&lt;/p&gt;

&lt;p&gt;I&apos;m hesitant to modify the tests or shell... can you work with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=renctan&quot; class=&quot;user-hover&quot; rel=&quot;renctan&quot;&gt;renctan&lt;/a&gt; to figure out how much duplicate code this would result in, and whether the Session refactor will actually be able to address it?&lt;/p&gt;</comment>
                            <comment id="1960132" author="jack.mulrow" created="Mon, 30 Jul 2018 14:42:34 +0000"  >&lt;p&gt;Sorry I think my comments were a little confusing, I only meant we might throw away work to upconvert local or majority readConcern to snapshot once we support more than just snapshot on mongod. I agree we&apos;ll always want to do something on mongos when there is no readConcern.&lt;/p&gt;

&lt;p&gt;If we want to keep the behavior of upconverting no readConcern to snapshot, then that&apos;s what I&apos;ll add to mongos as part of this ticket. And if we end up deciding to change the default level later, it shouldn&apos;t be hard to do.&lt;/p&gt;</comment>
                            <comment id="1959990" author="esha.maharishi@10gen.com" created="Mon, 30 Jul 2018 13:46:49 +0000"  >&lt;p&gt;My understanding is that we want to preserve the 4.0 behavior of no readConcern being upconverted to snapshot.&lt;/p&gt;

&lt;p&gt;In order to do that in a cluster, mongos has to check if it needs to upconvert to snapshot (it can&apos;t just let the shards do this), because mongos has to choose the atClusterTime for snapshot.&lt;/p&gt;

&lt;p&gt;We will need to modify the user&apos;s readConcern anyway to include the atClusterTime... I guess I&apos;m a little confused why the work to upconvert to snapshot on mongos would get thrown away?&lt;/p&gt;</comment>
                            <comment id="1958413" author="jack.mulrow" created="Fri, 27 Jul 2018 14:24:26 +0000"  >&lt;p&gt;Since I think we&apos;re planning on supporting local and majority level transactions this release, it feels like a waste to spend time implementing it on mongos just to remove it later. Also I think writing the code to do this would be a little awkward, since we can&apos;t just change the value stored on the readConcern operation context decoration like mongod does, we&apos;d probably also want to modify the user&apos;s request itself when we parse its readConcern, which I&apos;d rather avoid if we don&apos;t really have to do it.&lt;/p&gt;</comment>
                            <comment id="1958376" author="esha.maharishi@10gen.com" created="Fri, 27 Jul 2018 13:52:06 +0000"  >&lt;p&gt;Why shouldn&apos;t we add the upconverting behavior to mongos? Is it because the code is not in a state to do that yet?&lt;/p&gt;</comment>
                            <comment id="1957796" author="renctan" created="Thu, 26 Jul 2018 19:06:15 +0000"  >&lt;p&gt;If we make mongos return an error if readConcern is not specified, this would mean that it would behave differently with mongod. If we are gonna go that route, we probably need to make sure that the drivers would always supply readConcern when starting a transaction in mongos. I don&apos;t like the option of changing the default to snapshot in the shell but the first bullet option sounds good to me.&lt;/p&gt;</comment>
                            <comment id="1956875" author="jack.mulrow" created="Wed, 25 Jul 2018 22:16:02 +0000"  >&lt;p&gt;The real purpose of this ticket is just to figure out how mongos should deal with transactions that don&apos;t specify a readConcern. Once &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35709&quot; title=&quot;mongos should remember readConcern setting for multi statement transaction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35709&quot;&gt;&lt;del&gt;SERVER-35709&lt;/del&gt;&lt;/a&gt; is committed, mongos will inspect requests with startTransaction for a readConcern and uassert if there isn&apos;t one (since I wasn&apos;t sure what else to have it do), so we&apos;ll have to do something if we want to run most of the &lt;tt&gt;core/txns&lt;/tt&gt; suite against mongos.&lt;/p&gt;

&lt;p&gt;If we want to delay making an actual decision, I can think of two straightforward ways to get the txns suite running:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Add explicit snapshot readConcerns to the tests that rely on upconverting (except the ones that specifically test upconverting). They already run with snapshot readConcern, since that&apos;s the only level mongod supports, so making it explicit won&apos;t change behavior.&lt;/li&gt;
	&lt;li&gt;Change the shell transaction API to use readConcern snapshot as the default if the user doesn&apos;t provide one. That way we won&apos;t need to modify any tests, but I think the behavior would be more confusing and we&apos;d have to remember to undo the change at some point.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kaloian.manassiev&quot; class=&quot;user-hover&quot; rel=&quot;kaloian.manassiev&quot;&gt;kaloian.manassiev&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;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=renctan&quot; class=&quot;user-hover&quot; rel=&quot;renctan&quot;&gt;renctan&lt;/a&gt; what do you guys think?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                        <issuelink>
            <issuekey id="584996">DOCS-11944</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="562130">SERVER-35709</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>9.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 26 Jul 2018 19:06:15 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 28 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, 28 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jack.mulrow@mongodb.com</customfieldvalue>
            <customfieldvalue>randolph@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu38br:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8oin:</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="2387">Sharding 2018-07-30</customfieldvalue>
    <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|hu2ul3:</customfieldvalue>

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