<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:01:18 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-64856] Explore reusing the caller&apos;s WT_SESSION in getLatestOplogTimestamp</title>
                <link>https://jira.mongodb.org/browse/SERVER-64856</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;As a spin-off of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61116&quot; title=&quot;Audit and add assertions against using multiple WT_SESSIONs on the same thread&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61116&quot;&gt;SERVER-61116&lt;/a&gt;, we should investigate the possibility of avoiding a dedicated WT_SESSION in getLatestOplogTimestamp. Determining whether it&apos;s possible to reduce the cases where we&apos;re required to call getLatestOplogTimestamp may facilitate this task.&lt;/p&gt;

&lt;p&gt;Pasting the relevant comments from&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61116&quot; title=&quot;Audit and add assertions against using multiple WT_SESSIONs on the same thread&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61116&quot;&gt;SERVER-61116&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt; we&apos;ve identified a possible way to avoid using a second session in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r6.0.0-alpha/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp#L1450&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;getLatestOplogTimestamp&lt;/a&gt;. Because the oplog is a logged table, and because per &lt;a href=&quot;https://jira.mongodb.org/browse/WT-8601&quot; title=&quot;Timestamps do not work with logged tables.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;WT-8601&quot;&gt;&lt;del&gt;WT-8601&lt;/del&gt;&lt;/a&gt; logged tables are not timestamped, we would potentially be able to reuse the existing recovery unit&apos;s session. However doing so would change some of the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r6.0.0-alpha/src/mongo/db/storage/record_store.h#L585..L586&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;current visibility behaviour&lt;/a&gt; and include uncommitted writes on the operation context. We should determine whether there are consumers relying on this behaviour - seems that waiting for write concern could be potentially affected.&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=daniel.gottlieb&quot; class=&quot;user-hover&quot; rel=&quot;daniel.gottlieb&quot;&gt;daniel.gottlieb&lt;/a&gt; ran an &lt;a href=&quot;https://spruce.mongodb.com/version/622f66493e8e863e38c0dbbc/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;experiment&lt;/a&gt; &lt;del&gt;which didn&apos;t seem to detect any call site&lt;/del&gt; to surface calls sites of getLatestOplogTimestamp with an open transaction. We should investigate whether we actually need to call getLatestOplogTimestamp for write operations, as in principle writes assign a timestamp to the WUOW, so it should be sufficient for the caller to do any waiting for that time.&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
        <key id="2007879">SERVER-64856</key>
            <summary>Explore reusing the caller&apos;s WT_SESSION in getLatestOplogTimestamp</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="yujin.kang@mongodb.com">Yujin Kang Park</assignee>
                                    <reporter username="josef.ahmad@mongodb.com">Josef Ahmad</reporter>
                        <labels>
                    </labels>
                <created>Thu, 24 Mar 2022 08:39:12 +0000</created>
                <updated>Sun, 29 Oct 2023 21:40:38 +0000</updated>
                            <resolved>Wed, 6 Jul 2022 09:32:38 +0000</resolved>
                                                    <fixVersion>6.1.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="4658310" author="xgen-internal-githook" created="Tue, 5 Jul 2022 18:11:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Yu Jin Kang Park&apos;, &apos;email&apos;: &apos;yujin.kang@mongodb.com&apos;, &apos;username&apos;: &apos;ykangpark&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-64856&quot; title=&quot;Explore reusing the caller&amp;#39;s WT_SESSION in getLatestOplogTimestamp&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-64856&quot;&gt;&lt;del&gt;SERVER-64856&lt;/del&gt;&lt;/a&gt;: Remove use of secondary WT_SESSION in getLatestOplogTimestamp&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/02dfedb849374159219251422ada6035333e2c3b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/02dfedb849374159219251422ada6035333e2c3b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4569542" author="daniel.gottlieb@10gen.com" created="Tue, 24 May 2022 15:15:15 +0000"  >&lt;p&gt;Yep that sounds accurate. &lt;/p&gt;</comment>
                            <comment id="4568673" author="josef.ahmad" created="Tue, 24 May 2022 09:51:50 +0000"  >&lt;p&gt;Thanks Yujin for spotting this, I&apos;ve updated my comment as it was inaccurate. There are indeed getLatestOplogTimestamp call sites with an open transaction, I had a quick look at the patch and it seems quite frequent with index builds (runCreateIndexesWithCoordinator).&lt;/p&gt;

&lt;p&gt;I believe the main goal is to determine whether it&apos;s possible for write operations to avoid calling getLatestOplogTimestamp at all, and just wait for write concern at the timestamp that was assigned in the WriteUnitOfWork. If this is possible, then we can effectively remove the conditions for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61116&quot; title=&quot;Audit and add assertions against using multiple WT_SESSIONs on the same thread&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61116&quot;&gt;SERVER-61116&lt;/a&gt; to manifest for the getLatestOplogTimestamp API (that is, not write on one session then read on a new session). If this is not possible, then we should investigate whether it&apos;s safe for getLatestOplogTimestamp to just reuse the caller&apos;s WT session, specifically whether it&apos;s safe to alter the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r6.0.0-alpha/src/mongo/db/storage/record_store.h#L585..L586&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;current behaviour that getLatestOplogTimestamp doesn&apos;t include uncommitted writes&lt;/a&gt;. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=daniel.gottlieb%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;daniel.gottlieb@mongodb.com&quot;&gt;daniel.gottlieb@mongodb.com&lt;/a&gt; as this stretches a bit beyond my domain expertise, can you confirm my understanding is accurate?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1913356">SERVER-61116</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>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</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>Mon, 23 May 2022 15:51:18 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 31 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2841</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>
                            1 year, 31 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>daniel.gottlieb@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>josef.ahmad@mongodb.com</customfieldvalue>
            <customfieldvalue>yujin.kang@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0oc07:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i00cw4:</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="5981">Execution Team 2022-05-30</customfieldvalue>
    <customfieldvalue id="6029">Execution Team 2022-06-13</customfieldvalue>
    <customfieldvalue id="6030">Execution Team 2022-06-27</customfieldvalue>
    <customfieldvalue id="6038">Execution Team 2022-07-11</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|i0ny5j:</customfieldvalue>

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