<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:09:46 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-45810] Explore removing the WiredTigerOplogManager via refactor</title>
                <link>https://jira.mongodb.org/browse/SERVER-45810</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;If we do not remove the WiredTigerOplogManager, then should file a ticket to refactor the naming of things &amp;#8211; e.g. _oplogJournalThreadLoop -&amp;gt; _updateOplogReadTimestampLoop, triggerJournalFlush -&amp;gt; triggerOplogReadTimestampUpdate (remove reference to Journal after the replicate before journaling project is complete and the waitUntilDurable call is removed).&lt;/p&gt;</description>
                <environment></environment>
        <key id="1118101">SERVER-45810</key>
            <summary>Explore removing the WiredTigerOplogManager via refactor</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="12300">Won&apos;t Do</resolution>
                                        <assignee username="dianna.hohensee@mongodb.com">Dianna Hohensee</assignee>
                                    <reporter username="dianna.hohensee@mongodb.com">Dianna Hohensee</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 Jan 2020 14:14:44 +0000</created>
                <updated>Fri, 3 Apr 2020 12:55:21 +0000</updated>
                            <resolved>Wed, 1 Apr 2020 21:13:52 +0000</resolved>
                                                                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="3021986" author="dianna.hohensee" created="Wed, 1 Apr 2020 21:13:33 +0000"  >&lt;p&gt;Removing the OplogManager thread could cause performance repercussions.&lt;/p&gt;

&lt;p&gt;The OplogManager thread runs updates of the oplogReadTimestamp whenever it is signaled by another thread &amp;#8211; like in _txnClose after we&apos;ve committed an unordered write on a primary. The OplogManager is therefore batching callers; and the callers do not wait for the update to occur, only signal the OplogManager thread that it should do an update.&lt;/p&gt;

&lt;p&gt;Eliminating the OplogManager thread would serialize unordered write operations behind updating the oplogReadTimestamp. We could create a barrier, after which a caller A checks if some other caller already did the update since caller A started waiting to do the update and leave early instead. However, given our experience with performance in other areas of the code, this has greater odds (though unknown without doing) of causing a performance decrease. The waitUntilDurable() logic has such a barrier, and after moving waitForWriteConcern callers onto the JournalFlusher thread to batch callers like the OplogManager does, performance increased: the waitUntilDurable() barrier was not as good as the async batching.&lt;/p&gt;

&lt;p&gt;-----------------------------------------------------------------------------------------------------------------&lt;br/&gt;
My exploration of the OplogManager code and from where it is called and what it uses leads to me think we would be better off keeping a separate class, even if we were to eliminate the async thread.&lt;/p&gt;

&lt;p&gt;As far as the rest of the OplogManager logic goes:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Currently the WiredTigerRecoveryUnit and WiredTigerKVEngine both keep a ptr to the OplogManager.&lt;/li&gt;
	&lt;li&gt;The WiredTigerRecord store holds a ptr to the WiredTigerKVEngine, on which it calls getOplogManager() to access the OplogManager itself.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Without the OplogManager, the following logic would most likely move to the WiredTigerRecoveryUnit, given&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;static fetchAllDurableValue(WT_CONNECTION* conn)&lt;/li&gt;
	&lt;li&gt;static setOplogReadTimestamp(Timestamp ts)&lt;/li&gt;
	&lt;li&gt;static getOplogReadTimestamp()&lt;/li&gt;
	&lt;li&gt;waitForAllEarlierOpogWritesToBeVisible()&lt;/li&gt;
	&lt;li&gt;static oplogReadTimestamp state&lt;br/&gt;
And the WiredTigerKVEngine would need a oplog WiredTigerRecordStore* instead of a WiredTigerOplogManager*.&lt;br/&gt;
Alternatively, the WiredTigerKVEngine only needs the OplogManager to call fetchAllDurableValue, so instead of keeping a WiredTigerRecordStore*, WiredTigerKVEngine could reimplement fetchAllDurableValue (in addition to needing an implementation in the WiredTigerRecoveryUnit).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Lastly, the WiredTigerRecordStore controls starting and stopping the OplogManager when the oplog collection is created; and the WiredTigerKVEngine implements the start/halt functions, which the WiredTigerRecordStore calls, to tell the OplogManager to start/halt. The WiredTigerRecordStore only keeps a WiredTigerKVEngine* to access the OplogManager, the KVEngine is used for nothing else.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1042203">SERVER-45025</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1300834">SERVER-47258</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>1.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_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 45 weeks 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/PM-1274'>PM-1274</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_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>dianna.hohensee@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 45 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>dianna.hohensee@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hwlrav:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hwn5bb:</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="3633">Execution Team 2020-04-06</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|hwldk7:</customfieldvalue>

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