<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:45:43 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-81179] Backup cursor service reports backup cursor checkpointTimestamp that does not match the actual WT backup cursor checkpointTimestamp</title>
                <link>https://jira.mongodb.org/browse/SERVER-81179</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;After&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81032&quot; title=&quot;Fix checkpoint detection while opening a backup cursor &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81032&quot;&gt;&lt;del&gt;SERVER-81032&lt;/del&gt;&lt;/a&gt;, the&#160;&#160;backup cursor service&#160;reports backup cursor&#160;&lt;tt&gt;checkpointTimestamp&lt;/tt&gt;&#160; that does not match the actual checkpointTimestamp at which WT opened a backup cursor, i.e, reported&#160;&lt;tt&gt;checkpointTimestamp&lt;/tt&gt;&#160;&#160; can be &amp;lt;= actual&#160;&lt;tt&gt;checkpointTimestamp)&lt;/tt&gt;&#160;, instead of&#160;&lt;tt&gt;==&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Given the fact &lt;a href=&quot;https://github.com/wiredtiger/wiredtiger/blob/master/src/txn/txn_ckpt.c#L959&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;committing the checkpoint&lt;/a&gt; and updating &lt;a href=&quot;https://github.com/wiredtiger/wiredtiger/blob/f8cb8f23fb1bc4a41ce529a44755c41f2cfdd9a9/src/txn/txn_ckpt.c#L1015&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;txn_global.last_ckpt_timestamp&lt;/a&gt; (reported by getLastStableRecoveryTimestamp()) aren&apos;t atomic. This means, we can end up a scenario, like below&lt;/p&gt;

&lt;p&gt;1) &lt;b&gt;&lt;font color=&quot;#00875a&quot;&gt;CKPT thread&lt;/font&gt;:&lt;/b&gt; WT checkpoint committed for TS(100) with ckptId:100&lt;br/&gt;
2) BackupService thread: &lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/blob/a4b09ab3706809ceff5fbe70403bed5581fe970a/src/hot_backups/backup_cursor_service.cpp#L148&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Opens&lt;/a&gt; the _mdb_catalog cursor with read source as KCheckpoint.&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;This will open the checkpoint cursor on the latest checkpoint, ckptId:100&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;3) BackupService thread: &lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/blob/a4b09ab3706809ceff5fbe70403bed5581fe970a/src/hot_backups/backup_cursor_service.cpp#L156C46-L156C76&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Calls getLastStableRecoveryTimestamp()&lt;/a&gt; and reads the previous checkpoint&#160; ts values , say TS(90).&lt;br/&gt;
4) &lt;font color=&quot;#00875a&quot;&gt;&lt;b&gt;CKPT thread&lt;/b&gt;&lt;/font&gt;: Updates the {{txn_global.last_ckpt_timestamp }} to TS(100)&lt;br/&gt;
5) BackupService thread: &lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/blob/a4b09ab3706809ceff5fbe70403bed5581fe970a/src/hot_backups/backup_cursor_service.cpp#L164&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Opens&lt;/a&gt; the backup cursor&lt;br/&gt;
6) BackupService thread: &lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/blob/a4b09ab3706809ceff5fbe70403bed5581fe970a/src/hot_backups/backup_cursor_service.cpp#L194-L201&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Verifies&lt;/a&gt; if any checkpoint was taken between step #3 and #5 .&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;For which, It agains opens the checkpoint cursor on _mdb_catalog and reads checkpoint id as ckptId:100, and compares with step#2 checkpoint Id.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Since, step #2 and step#6 checkpoint Id are same, the sanity check in step#6 passes. However, now the backup cursor returns the `checkpointTimestamp` as TS(90) (ie, step #3 value) instead of actual checkpoint ts value at which WT opened backup cursor, which is TS(100).&lt;/p&gt;

&lt;p&gt;Before &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81032&quot; title=&quot;Fix checkpoint detection while opening a backup cursor &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81032&quot;&gt;&lt;del&gt;SERVER-81032&lt;/del&gt;&lt;/a&gt;, &lt;b&gt;given the fact WT takes checkpoint lock when &lt;a href=&quot;https://github.com/wiredtiger/wiredtiger/blob/c97cff0bf61e1e07709a6c15835020925ed05cb3/src/cursor/cur_backup.c#L318&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;opening the backup cursor&lt;/a&gt; (step #5) and for the entire &lt;a href=&quot;https://github.com/wiredtiger/wiredtiger/blob/master/src/txn/txn_ckpt.c#L1157&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;checkpoint job&lt;/a&gt;,&lt;/b&gt; at step#6, calling the getLastStableRecoveryTimestamp() would guarantee to return at least TS(100), in the above case . And, I think, any new checkpoints between step#5 and #6 is uninteresting. So, it&apos;s ok, even if Step#6 reads the stale last checkpoint ts.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;My proposal would be to make step 6 to use the &lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/blob/5facb724af3a23ce4c8278209f606f71a8888950/src/hot_backups/backup_cursor_service.cpp#L191-L206&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;original way&lt;/a&gt; , which is&#160; using `getLastStableRecoveryTimestamp()`&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2445638">SERVER-81179</key>
            <summary>Backup cursor service reports backup cursor checkpointTimestamp that does not match the actual WT backup cursor checkpointTimestamp</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="gregory.noma@mongodb.com">Gregory Noma</assignee>
                                    <reporter username="suganthi.mani@mongodb.com">Suganthi Mani</reporter>
                        <labels>
                    </labels>
                <created>Tue, 19 Sep 2023 06:55:41 +0000</created>
                <updated>Sun, 29 Oct 2023 21:16:13 +0000</updated>
                            <resolved>Wed, 20 Sep 2023 20:41:43 +0000</resolved>
                                                    <fixVersion>7.2.0-rc0</fixVersion>
                    <fixVersion>7.1.0-rc4</fixVersion>
                                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="5714957" author="suganthi.mani" created="Tue, 19 Sep 2023 15:11:03 +0000"  >&lt;p&gt;Regression in 7.1&lt;/p&gt;</comment>
                            <comment id="5714750" author="suganthi.mani" created="Tue, 19 Sep 2023 14:31:17 +0000"  >&lt;p&gt;spoke offline and we agreed to have backup cursor service do the following steps&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Open checkpoint cursor on &lt;tt&gt;_mdb_catalog&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;Read last stable recovery timestamp&lt;/li&gt;
	&lt;li&gt;Open WT backup cursor&lt;/li&gt;
	&lt;li&gt;Read last stable recovery timestamp&lt;/li&gt;
	&lt;li&gt;Verify if a checkpoint occurred&#160; between step #2&#160; and step #3&#160; by comparing steps #2 and #4 value.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;This will address both BF-29621 and BF-30016&#160; CC &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=gregory.wlodarek%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;gregory.wlodarek@mongodb.com&quot;&gt;gregory.wlodarek@mongodb.com&lt;/a&gt; &#160; &#160; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=gregory.noma%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;gregory.noma@mongodb.com&quot;&gt;gregory.noma@mongodb.com&lt;/a&gt; &#160;&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>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2441116">SERVER-81032</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2446222">WT-11709</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2446226">SERVER-81208</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>2.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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26007"><![CDATA[Storage Execution NAMER]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26243"><![CDATA[v7.1]]></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>Tue, 19 Sep 2023 15:10:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        20 weeks, 1 day 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>
                            20 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>148.0</customfieldvalue>

                        </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>gregory.noma@mongodb.com</customfieldvalue>
            <customfieldvalue>suganthi.mani@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2r4pr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0rbfk:9</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="7561">Execution NAMR Team 2023-10-02</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|i2qqv3:</customfieldvalue>

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