<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:11:01 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-68514] Delay announcement of new primary until first oplog entry in term is majority committed</title>
                <link>https://jira.mongodb.org/browse/SERVER-68514</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;During investigation into majority-unavailability times during planned maintenance, some several-second majority-write unavailability windows were noted.  These were associated with clients doing a high volume of w:1 writes when the scheduled failover happened.&lt;/p&gt;

&lt;p&gt;The cause appears to be very heavy write load on the new primary as soon as it announces its own write-availability.  This causes both establishment of the OplogFetcher connections and the subsequent oplog query to be very slow &amp;#8211; from hundreds of milliseconds to several seconds to retrieve 16MB of data.&lt;/p&gt;

&lt;p&gt;A POC to alleviate this issue by delaying the announcement of the new primary (via the &apos;hello&apos; command) until after the commit point of the set reaches the new term was implemented, and reduced majority unavailability (measured to the first &lt;em&gt;user&lt;/em&gt; write), by 40-50%.  This means replication gets a chance to set up the spanning tree before the write load hits the new primary.&lt;/p&gt;

&lt;p&gt;The longest delay in the mixed-workloads-with-stepdowns test without this change was around 5400ms, reduced to 2700ms with it.  Average reduction over terms with load was from 640ms to 370ms.&lt;/p&gt;

&lt;p&gt;The disadvantages include an increase in w:1 write and primary-only read availability.  On average this was minor &amp;#8211; from ~10ms to ~15ms &amp;#8211; but there were a few unexplained jumps to 250ms or 500ms.  Another disadvantage is that if the majority point of the set is already lagged for any reason, no w:1 writes can occur until it is caught up, which may result in long w:1 unavailability in applications where w:majority is not being used.&lt;/p&gt;

&lt;p&gt;This would supersede &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-53813&quot; title=&quot;Avoid serving stale majority reads on new primary after election&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-53813&quot;&gt;SERVER-53813&lt;/a&gt;, which would only delay majority reads on the new primary, not announcement of it for all purposes.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2104997">SERVER-68514</key>
            <summary>Delay announcement of new primary until first oplog entry in term is majority committed</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="matthew.russotto@mongodb.com">Matthew Russotto</reporter>
                        <labels>
                            <label>former-quick-wins</label>
                    </labels>
                <created>Tue, 2 Aug 2022 18:59:25 +0000</created>
                <updated>Mon, 10 Jul 2023 15:43:49 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="4880710" author="steven.vannelli" created="Wed, 5 Oct 2022 19:07:21 +0000"  >&lt;p&gt;Similar to the comment left on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-53813&quot; title=&quot;Avoid serving stale majority reads on new primary after election&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-53813&quot;&gt;SERVER-53813&lt;/a&gt;: The Serverless Init team doesn&apos;t see this as a burning issue that warrants a request for this ticket in the upcoming QP so we feel like this can be backlogged for now. However, if anyone feels differently and has a strong need/desire for it in the near term, please raise that.&lt;/p&gt;</comment>
                            <comment id="4723835" author="matthew.russotto" created="Tue, 2 Aug 2022 22:38:12 +0000"  >&lt;p&gt;POC branch:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/10gen/mongo/tree/matthew.russotto/SERVER-68514_POC&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo/tree/matthew.russotto/SERVER-68514_POC&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2387525">SERVER-78813</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1590677">SERVER-53813</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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25128"><![CDATA[Replication]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 5 Oct 2022 19:07:21 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 18 weeks 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_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>lingzhi.deng@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 18 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-repl</customfieldvalue>
            <customfieldvalue>matthew.russotto@mongodb.com</customfieldvalue>
            <customfieldvalue>steven.vannelli@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i14t8n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr1mow:003i</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_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|i14fdz:</customfieldvalue>

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