<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:17:14 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-48475] Secondary reads always calculate all_durable despite only using lastApplied</title>
                <link>https://jira.mongodb.org/browse/SERVER-48475</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;As of&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46721&quot; title=&quot;Step up may cause reads at PIT with holes after yielding&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46721&quot;&gt;&lt;del&gt;SERVER-46721&lt;/del&gt;&lt;/a&gt;, reads on secondaries used the no-overlap point, which is computed as the minimum of replication&apos;s lastApplied and WT&apos;s all_durable timestamps.&lt;/p&gt;

&lt;p&gt;On secondaries, lastApplied is only updated at replication batch boundaries, and all_durable may advance as we apply oplog entries out of order. Because we take the minimum value, the no-overlap point is always equal to lastApplied.&lt;/p&gt;

&lt;p&gt;Reads on secondaries will perform &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a7541c60e5904e7deafdedf5bb040cc8924ac7d3/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp#L577&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;unnecessary queries for all_durable&lt;/a&gt;. This value is not cached, and requires taking a read lock in WT to traverse a queue of commit timestamps.&lt;/p&gt;

&lt;p&gt;We can regain some performance for reads by only using lastApplied on secondaries.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1365768">SERVER-48475</key>
            <summary>Secondary reads always calculate all_durable despite only using lastApplied</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>bkp</label>
                    </labels>
                <created>Thu, 28 May 2020 18:02:03 +0000</created>
                <updated>Sun, 29 Oct 2023 22:07:40 +0000</updated>
                            <resolved>Fri, 5 Jun 2020 16:34:37 +0000</resolved>
                                    <version>4.5.1</version>
                    <version>4.4.0-rc7</version>
                                    <fixVersion>4.4.0-rc9</fixVersion>
                    <fixVersion>4.7.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3324808" author="xgen-internal-githook" created="Thu, 6 Aug 2020 16:07:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Louis Williams&apos;, &apos;email&apos;: &apos;louis.williams@mongodb.com&apos;, &apos;username&apos;: &apos;louiswilliams&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46721&quot; title=&quot;Step up may cause reads at PIT with holes after yielding&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46721&quot;&gt;&lt;del&gt;SERVER-46721&lt;/del&gt;&lt;/a&gt; Secondary readers should read at the no-overlap time instead of lastApplied&lt;/p&gt;

&lt;p&gt;The no-overlap time, ReadSource::kNoOverlap, is the minimum of replication&apos;s lastApplied timestamp&lt;br/&gt;
and WiredTiger&apos;s all_durable time. This time is independent of replication state and ensures&lt;br/&gt;
queries do not see oplog holes after state transitions from secondary to primary.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 25c694f365db0f07a445bd17b6cd5cbf32f5f2f9)&lt;br/&gt;
(cherry picked from commit 5ddf9db5635e4af2d1295bd2f1007e86d517c6c2)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44529&quot; title=&quot;Re-acquiring locks after a yield and step down results in wrong parameters on recoveryUnit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-44529&quot;&gt;&lt;del&gt;SERVER-44529&lt;/del&gt;&lt;/a&gt; Query yield recovery after a stepdown should switch to read at the no-overlap time&lt;/p&gt;

&lt;p&gt;After yielding and reacquiring locks in a query, the preconditions that were used to select our&lt;br/&gt;
ReadSource initially need to be checked again. Queries hold an AutoGetCollectionForRead RAII&lt;br/&gt;
lock for their lifetime, which may select a ReadSource based on state (e.g. replication&lt;br/&gt;
state). After a query yields its locks, this state may have changed, invalidating our current&lt;br/&gt;
choice of ReadSource.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit b3a5b5258a487006f0487b9e7e0a1d0d4f1119ff)&lt;br/&gt;
(cherry picked from commit ce57ddce19e642401ec1b56871b3a9402116ccfc)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48475&quot; title=&quot;Secondary reads always calculate all_durable despite only using lastApplied&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48475&quot;&gt;&lt;del&gt;SERVER-48475&lt;/del&gt;&lt;/a&gt; Reimplement lastApplied for secondary reads&lt;/p&gt;

&lt;p&gt;This partially reverts work to use the kNoOverlap ReadSource on secondaries since the all_durable&lt;br/&gt;
calculation is unnecessary and expensive.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit ff92d4435fa75c2b947c49cffaf48805b320a5ae)&lt;br/&gt;
(cherry picked from commit 4e3f3b96826772baa777b7563b38574c1e11c2e4)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/caef6619556ddeb20adf8e2bad651b96d2b3ea70&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/caef6619556ddeb20adf8e2bad651b96d2b3ea70&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3193085" author="xgen-internal-githook" created="Fri, 5 Jun 2020 19:16:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Louis Williams&apos;, &apos;email&apos;: &apos;louis.williams@mongodb.com&apos;, &apos;username&apos;: &apos;louiswilliams&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48475&quot; title=&quot;Secondary reads always calculate all_durable despite only using lastApplied&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48475&quot;&gt;&lt;del&gt;SERVER-48475&lt;/del&gt;&lt;/a&gt; Reimplement lastApplied for secondary reads&lt;/p&gt;

&lt;p&gt;This partially reverts work to use the kNoOverlap ReadSource on&lt;br/&gt;
secondaries since the all_durable calculation is unnecessary and&lt;br/&gt;
expensive.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit ff92d4435fa75c2b947c49cffaf48805b320a5ae)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/4e3f3b96826772baa777b7563b38574c1e11c2e4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/4e3f3b96826772baa777b7563b38574c1e11c2e4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3192606" author="xgen-internal-githook" created="Fri, 5 Jun 2020 16:05:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Louis Williams&apos;, &apos;email&apos;: &apos;louis.williams@mongodb.com&apos;, &apos;username&apos;: &apos;louiswilliams&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48475&quot; title=&quot;Secondary reads always calculate all_durable despite only using lastApplied&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48475&quot;&gt;&lt;del&gt;SERVER-48475&lt;/del&gt;&lt;/a&gt; Reimplement lastApplied for secondary reads&lt;/p&gt;

&lt;p&gt;This partially reverts work to use the kNoOverlap ReadSource on&lt;br/&gt;
secondaries since the all_durable calculation is unnecessary and&lt;br/&gt;
expensive.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ff92d4435fa75c2b947c49cffaf48805b320a5ae&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ff92d4435fa75c2b947c49cffaf48805b320a5ae&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="994549">SERVER-44529</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1253817">SERVER-46721</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>3.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_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="18953"><![CDATA[v4.4]]></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>Fri, 5 Jun 2020 16:05:56 +0000</customfieldvalue>

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

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</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|hxnjvj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hx4xfr:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3937">Execution Team 2020-06-15</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|hxn64v:</customfieldvalue>

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