<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:40:59 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-79442] Update command may send mirrored reads without filter, hint or collation</title>
                <link>https://jira.mongodb.org/browse/SERVER-79442</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently update command only &lt;a href=&quot;https://github.com/mongodb/mongo/blob/246a0bb69fa59fca2825251d5abb15c676bef507/src/mongo/db/commands/write_commands.cpp#L408&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sets _updateOpObj&lt;/a&gt; when the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/246a0bb69fa59fca2825251d5abb15c676bef507/src/mongo/db/commands/write_commands.cpp#L402&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;`updates` DocumentSequence is present&lt;/a&gt; in OpMsg. However this is often not the case, especially due to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-77648&quot; title=&quot;Support sending OpMsgRequests via AsyncRequestSender and switch to using it for batched writes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-77648&quot;&gt;&lt;del&gt;SERVER-77648&lt;/del&gt;&lt;/a&gt; which means that all update commands sent from mongos to mongod are serialized in a way that does not have any DocumentSequence in OpMsg (this can be verified by doing a simple update through mongos in a sharded cluster).&lt;br/&gt;
&#160;&lt;br/&gt;
Without correctly setting _updateOpObj, the mirrored read requests sent to secondaries will &lt;a href=&quot;https://github.com/mongodb/mongo/blob/246a0bb69fa59fca2825251d5abb15c676bef507/src/mongo/db/commands/write_commands.cpp#L430-L432&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;not have filter, hint or collation&lt;/a&gt;, and this means that the documents we put into secondary&apos;s cache will not be the same as user read on primary. This might have negative impact on the effectiveness of cache warmup.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2403310">SERVER-79442</key>
            <summary>Update command may send mirrored reads without filter, hint or collation</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-servicearch">Backlog - Service Architecture</assignee>
                                    <reporter username="wenbin.zhu@mongodb.com">Wenbin Zhu</reporter>
                        <labels>
                            <label>techdebt</label>
                    </labels>
                <created>Thu, 27 Jul 2023 22:17:46 +0000</created>
                <updated>Tue, 1 Aug 2023 18:11:31 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5599527" author="JIRAUSER1258790" created="Fri, 28 Jul 2023 20:24:24 +0000"  >&lt;p&gt;Yeah I also suspected internal update commands being one of the reason.&lt;/p&gt;</comment>
                            <comment id="5599512" author="kaitlin.mahar" created="Fri, 28 Jul 2023 20:18:00 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=wenbin.zhu%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;wenbin.zhu@mongodb.com&quot;&gt;wenbin.zhu@mongodb.com&lt;/a&gt; Ah I see. Thanks. Yes, there are a lot of failures. I know there are some cases mongod generates update commands internally like for aggregate with $merge so that could explain some of the failures. &lt;/p&gt;</comment>
                            <comment id="5599414" author="JIRAUSER1258790" created="Fri, 28 Jul 2023 19:27:53 +0000"  >&lt;blockquote&gt;&lt;p&gt;Can you clarify in what case that happens in a replica set? Who is sending the command to the primary?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I observed this because I changed &lt;a href=&quot;https://github.com/mongodb/mongo/blob/246a0bb69fa59fca2825251d5abb15c676bef507/src/mongo/db/commands/write_commands.cpp#L402&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this code&lt;/a&gt; to invariant that the `updates` DocumentSequence is always present in OpMsgRequest (&lt;a href=&quot;https://evergreen.mongodb.com/filediff/64c18abe9ccd4ee3f98b1805/?file_name=src%2Fmongo%2Fdb%2Fcommands%2Fwrite_commands.cpp&amp;amp;patch_number=0&amp;amp;commit_number=0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;patch&lt;/a&gt;), and I saw a lot of failures in the &lt;a href=&quot;https://spruce.mongodb.com/version/64c18abe9ccd4ee3f98b1805/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;canary patch build&lt;/a&gt; where the replica set tests are also failing, but I&apos;m not clear about the reason behind.&lt;/p&gt;</comment>
                            <comment id="5598424" author="kaitlin.mahar" created="Fri, 28 Jul 2023 14:21:29 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=wenbin.zhu%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;wenbin.zhu@mongodb.com&quot;&gt;wenbin.zhu@mongodb.com&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;it seems that this can even happen in a replica set&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Can you clarify in what case that happens in a replica set? Who is sending the command to the primary? &lt;/p&gt;</comment>
                            <comment id="5597051" author="JIRAUSER1258790" created="Thu, 27 Jul 2023 22:36:59 +0000"  >&lt;p&gt;Moreover &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-77648&quot; title=&quot;Support sending OpMsgRequests via AsyncRequestSender and switch to using it for batched writes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-77648&quot;&gt;&lt;del&gt;SERVER-77648&lt;/del&gt;&lt;/a&gt; talks about the case that a update command can be serialized to OpMsg without having DocumentSequence when the command is sent from mongos, however it seems that this can even happen in a replica set, this might need separate investigation.&lt;/p&gt;</comment>
                            <comment id="5597033" author="JIRAUSER1258790" created="Thu, 27 Jul 2023 22:22:46 +0000"  >&lt;p&gt;A couple of point from the offline discussion with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=amirsaman.memaripour%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;amirsaman.memaripour@mongodb.com&quot;&gt;amirsaman.memaripour@mongodb.com&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Even with this problem, we might still have enough in WiredTiger cache to have a smooth transition after the election (e.g., the top levels of the B-Tree for the collection will end up being in the cache anyway)&lt;/li&gt;
	&lt;li&gt;We never measured the effectiveness of mirror reads, this needs more product discussion.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;cc &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=shameek.ray%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;shameek.ray@mongodb.com&quot;&gt;shameek.ray@mongodb.com&lt;/a&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                    <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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25132"><![CDATA[Service Arch]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 28 Jul 2023 14:21:29 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            27 weeks, 5 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>backlog-server-servicearch</customfieldvalue>
            <customfieldvalue>kaitlin.mahar@mongodb.com</customfieldvalue>
            <customfieldvalue>wenbin.zhu@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2jvq7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i21zh4:</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_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|i2jhvj:</customfieldvalue>

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