<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:10:38 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-68380] Investigate MongoDB code that can use bounded WT cursors instead of search_near</title>
                <link>https://jira.mongodb.org/browse/SERVER-68380</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The new WT_CURSOR &lt;a href=&quot;https://source.wiredtiger.com/develop/struct_w_t___c_u_r_s_o_r.html#a1f31636c1cf31f72df576b82b03a4c44&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;bound&lt;/a&gt; feature is more efficient than a search_near if we set a lower bound and call next() or set an upper bound and call prev().&lt;/p&gt;

&lt;p&gt;The important cases we know about are already tracked in other tickets, but there is at least one case in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0b02969388ada47ec5b088e9c6a028054a99bf41/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp#L2331&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;seekNear&lt;/a&gt; that could take advantage of a bounded cursor.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2101267">SERVER-68380</key>
            <summary>Investigate MongoDB code that can use bounded WT cursors instead of search_near</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="louis.williams@mongodb.com">Louis Williams</assignee>
                                    <reporter username="louis.williams@mongodb.com">Louis Williams</reporter>
                        <labels>
                            <label>storex-perf</label>
                    </labels>
                <created>Thu, 28 Jul 2022 08:32:38 +0000</created>
                <updated>Thu, 1 Feb 2024 15:40:46 +0000</updated>
                            <resolved>Tue, 16 Jan 2024 18:24:09 +0000</resolved>
                                                    <fixVersion>7.3.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="6014680" author="xgen-internal-githook" created="Tue, 16 Jan 2024 18:03:58 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Louis Williams&apos;, &apos;email&apos;: &apos;louiswilliams@users.noreply.github.com&apos;, &apos;username&apos;: &apos;louiswilliams&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-68380&quot; title=&quot;Investigate MongoDB code that can use bounded WT cursors instead of search_near&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-68380&quot;&gt;&lt;del&gt;SERVER-68380&lt;/del&gt;&lt;/a&gt; Always use bounded cursors (#16754)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-68380&quot; title=&quot;Investigate MongoDB code that can use bounded WT cursors instead of search_near&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-68380&quot;&gt;&lt;del&gt;SERVER-68380&lt;/del&gt;&lt;/a&gt; Always use WT bounded cursors&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: 96960e245961a02f77cfa67717e6a689351bebb5&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1fa8459ee823b6f829564e16dce608ee78485b07&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1fa8459ee823b6f829564e16dce608ee78485b07&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5869611" author="jie.chen" created="Thu, 9 Nov 2023 22:52:52 +0000"  >&lt;p&gt;Hello from the storage engines team! I was part of the project that help created the bound cursors feature. I would like to help in this investigation as much as i can. Some things I would like to point out for the bound cursor feature. When a cursor is unpositioned and we call at next() with a lower bound set, we perform a small modification of &lt;tt&gt;cursor-&amp;gt;search_near()&lt;/tt&gt; function to position at the right spot.&lt;br/&gt;
 In &lt;tt&gt;cursor-&amp;gt;search_near()&lt;/tt&gt; in the case that we are not able to find a record on the search spot, we would bias and find a record in the forward direction using &lt;tt&gt;cursor-&amp;gt;next()&lt;/tt&gt; and if nothing is found, we would use &lt;tt&gt;cursor-&amp;gt;prev()&lt;/tt&gt; to find a record in the reverse direction. The small modification that cursor bounds does in this scenario is that we would stop early without the need to perform &lt;tt&gt;cursor-&amp;gt;next()&lt;/tt&gt; or &lt;tt&gt;cursor-&amp;gt;prev()&lt;/tt&gt; if the upper bound or lower bound is set. &lt;/p&gt;

&lt;p&gt;Another improvement that this could do internally is that we would be able to stop the next() call early due to deleted or invisible records. We would also read the deleted or invisible records to exit as early as possible, which creates a huge improvement in mass delete scenarios.&lt;/p&gt;</comment>
                            <comment id="5868164" author="louis.williams" created="Thu, 9 Nov 2023 16:12:46 +0000"  >&lt;p&gt;I found at least 2 bugs in bounded cursors, &lt;a href=&quot;https://jira.mongodb.org/browse/WT-11957&quot; title=&quot;Calling next() is not idempotent with bounded cursors and prepare conflicts&quot; class=&quot;issue-link&quot; data-issue-key=&quot;WT-11957&quot;&gt;&lt;del&gt;WT-11957&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/WT-11911&quot; title=&quot;Fix use-after-free with bounded cursor and search_near&quot; class=&quot;issue-link&quot; data-issue-key=&quot;WT-11911&quot;&gt;&lt;del&gt;WT-11911&lt;/del&gt;&lt;/a&gt;. The perf results are promising, but I&apos;m going to pause this work until those are addressed.&lt;/p&gt;</comment>
                            <comment id="5847290" author="louis.williams" created="Wed, 1 Nov 2023 19:27:10 +0000"  >&lt;p&gt;This would actually be valuable to avoid needing to use ignore_prepare=false on secondaries. This would workaround the bugs described in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40167&quot; title=&quot;Index key removal should not encounter prepare conflicts on unrelated keys&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40167&quot;&gt;&lt;del&gt;SERVER-40167&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40176&quot; title=&quot;Cursor seekExact should not use WT_CURSOR:search_near to avoid unintentional prepare conflicts&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40176&quot;&gt;&lt;del&gt;SERVER-40176&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="2489447">WT-11911</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2494898">WT-11957</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2375175">SERVER-78365</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2542797">SERVER-84748</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2023847">SERVER-65527</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2120230">SERVER-69093</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>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25136"><![CDATA[Storage Execution]]></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, 2 Nov 2023 02:41:46 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/WT-11911'>WT-11911</a></s>, <s><a href='https://jira.mongodb.org/browse/WT-11957'>WT-11957</a></s>]]></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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></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>benety.goh@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>20.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jie.chen@mongodb.com</customfieldvalue>
            <customfieldvalue>louis.williams@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1467r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1x9nr:rn9</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="7797">Execution Team 2023-12-25</customfieldvalue>
    <customfieldvalue id="7852">Execution Team 2024-01-08</customfieldvalue>
    <customfieldvalue id="7995">Execution Team 2024-01-22</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|i13sd3:</customfieldvalue>

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