<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:41: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-57325] Fix bugs due to race conditions in SBE oplog plans</title>
                <link>https://jira.mongodb.org/browse/SERVER-57325</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description></description>
                <environment></environment>
        <key id="1765027">SERVER-57325</key>
            <summary>Fix bugs due to race conditions in SBE oplog plans</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="12300">Won&apos;t Do</resolution>
                                        <assignee username="kevin.cherkauer@mongodb.com">Kevin Cherkauer</assignee>
                                    <reporter username="andrew.paroski@mongodb.com">Drew Paroski</reporter>
                        <labels>
                            <label>sbe-post-v1</label>
                    </labels>
                <created>Tue, 1 Jun 2021 15:28:03 +0000</created>
                <updated>Mon, 1 May 2023 18:30:00 +0000</updated>
                            <resolved>Mon, 1 May 2023 18:28:57 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="5391701" author="JIRAUSER1270811" created="Mon, 1 May 2023 18:28:58 +0000"  >&lt;p&gt;Support for oplog scans was determined to be out of scope for PM-3161. In consultation with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andrew.paroski%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;andrew.paroski@mongodb.com&quot;&gt;andrew.paroski@mongodb.com&lt;/a&gt; I deleted the existing buggy SBE oplog scan stage builder code from sbe_stage_builder_coll_scan.cpp as part of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-74521&quot; title=&quot;Support clustered collections in SBE without caching their plans&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-74521&quot;&gt;&lt;del&gt;SERVER-74521&lt;/del&gt;&lt;/a&gt;. That code had already been disabled for a long time by the check for &lt;b&gt;nss.isOplog()&lt;/b&gt; in query_utils.h &lt;b&gt;isQuerySbeCompatible()&lt;/b&gt;. oplog scans remain unsupported in SBE. If they are to be supported in future, the implementation should be redone from scratch, as the original implementation had fundamental problems.&lt;/p&gt;</comment>
                            <comment id="5271837" author="JIRAUSER1270811" created="Tue, 14 Mar 2023 17:06:57 +0000"  >&lt;p&gt;It looks like I will need to fix this as part of enabling clustered collection scans in SBE (PM-3161). Last week I independently discovered the problem of the build-time seek embedding minRecord and maxRecord bounds into the cached plan, which causes scans to return wrong results if the same query form gets submitted again with differing bounds, and also thought the correct fix to that is to pass minRecord and maxRecord into ScanStage and do the seek at run time instead of build time (as opposed to encoding minRecord and maxRecord into the plan cache key to force a mismatch).&lt;/p&gt;

&lt;p&gt;I found this problem when I patterened my new code implementing regular clustered collection scans on the existing oplog clustered collection scan code, not knowing at the time that the oplog scan code was known to be buggy.&lt;/p&gt;

&lt;p&gt;I also suspect the conditions for calling the oplog scan path&#160;&lt;b&gt;generateOptimizedOplogScan()&lt;/b&gt; in sbe_stage_builder_coll_scan.cpp generateCollScan() are not correct as they omit &lt;b&gt;|| csn-&amp;gt;resumeAfterRecordId&lt;/b&gt; in the oplog scan builder, so this flag will not reach generateOptimizedOplogScan() in some (or maybe all) cases when it should, even though that method has code to handle it:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    if (csn-&amp;gt;minRecord || csn-&amp;gt;maxRecord || csn-&amp;gt;stopApplyingFilterAfterFirstMatch) {        return generateOptimizedOplogScan( &lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;This problem would not have manifested either currently as oplog scans had been disabled in SBE (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57365&quot; title=&quot;Disable oplog scans in SBE&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57365&quot;&gt;&lt;del&gt;SERVER-57365&lt;/del&gt;&lt;/a&gt;) and have not yet been re-enabled.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1766408">SERVER-57365</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1614256">SERVER-54350</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 2 Jun 2021 19:03:29 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        40 weeks, 2 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-2103</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>kevin.cherkauer@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            40 weeks, 2 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>andrew.paroski@mongodb.com</customfieldvalue>
            <customfieldvalue>kevin.cherkauer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzj3jb:</customfieldvalue>

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

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