<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:04:45 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-23892] Do periodic replicated writes every 10 seconds while idle (for maxStalenessMS)</title>
                <link>https://jira.mongodb.org/browse/SERVER-23892</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;For the upcoming maxStalenessMS read preference it is required that periodically there needs to be a replicated write - so it would have a new oplog entry to move forward the OpTime reported to clients.&lt;/p&gt;

&lt;p&gt;These no-op &apos;n&apos; writes should only be done on the primary when no other replicated writes have been done in the timeout period.&lt;/p&gt;

&lt;p&gt;A side-effect of this will be that an idle replica set will no longer be idle with respect to writes, since it will internally force a write periodically. This new behavior (which also exists in master-slave replication) will show up in things like the calculation of &quot;replication lag&quot; never exceeding a second or two on caught up nodes &amp;#8211; previously a lack of writes for a few minutes would immediately show a lag of that period as the new write comes in until it is replicated.&lt;/p&gt;</description>
                <environment></environment>
        <key id="282043">SERVER-23892</key>
            <summary>Do periodic replicated writes every 10 seconds while idle (for maxStalenessMS)</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="9">Done</resolution>
                                        <assignee username="misha.tyulenev@mongodb.com">Misha Tyulenev</assignee>
                                    <reporter username="jesse@mongodb.com">A. Jesse Jiryu Davis</reporter>
                        <labels>
                    </labels>
                <created>Sun, 24 Apr 2016 23:51:08 +0000</created>
                <updated>Wed, 3 Mar 2021 17:25:48 +0000</updated>
                            <resolved>Sat, 27 Aug 2016 02:53:21 +0000</resolved>
                                                    <fixVersion>3.3.12</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>15</watches>
                                                                                                                <comments>
                            <comment id="1369793" author="xgen-internal-githook" created="Sat, 27 Aug 2016 02:49:54 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;mikety&apos;, u&apos;name&apos;: u&apos;Misha Tyulenev&apos;, u&apos;email&apos;: u&apos;misha@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-23892&quot; title=&quot;Do periodic replicated writes every 10 seconds while idle (for maxStalenessMS)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-23892&quot;&gt;&lt;del&gt;SERVER-23892&lt;/del&gt;&lt;/a&gt; Do periodic replicated writes while idle&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/355ff243409c2a330d64f212d809609402e80bb9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/355ff243409c2a330d64f212d809609402e80bb9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1332851" author="jesse" created="Fri, 22 Jul 2016 17:16:09 +0000"  >&lt;p&gt;The original justification for this feature is here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/max-staleness/max-staleness.rst#primary-must-write-periodic-no-ops&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/blob/master/source/max-staleness/max-staleness.rst#primary-must-write-periodic-no-ops&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1332620" author="misha.tyulenev" created="Fri, 22 Jul 2016 16:15:12 +0000"  >&lt;p&gt;Here are my thoughts on why we should not implement periodic writes:&lt;br/&gt;
the current formulas for the staleness:&lt;br/&gt;
with primary: (S.lastUpdateTime - S.lastWriteDate) - (P.lastUpdateTime - P.lastWriteDate) + heartbeatFrequencyMS&lt;br/&gt;
without primary: SMax.lastWriteDate - S.lastWriteDate + heartbeatFrequencyMS&lt;/p&gt;

&lt;p&gt;so if there are no writes to the primary the staleness estimation still will be as accurate as with periodic writes.&lt;br/&gt;
At mongos all the updates are delivered withing the heartbeatFrequencyMS interval so the nodes reporting the lastWriteDate are live. &lt;/p&gt;

&lt;p&gt;On the other side its possible to imagine the scenario when secondary is stale but not detectable because there is no writes. I think this is a corner case that will not happen in production. Also the first primary write would help detecting this issue and therefor all the consequent requests will satisfy the maxStaleness.&lt;/p&gt;</comment>
                            <comment id="1252462" author="jesse" created="Mon, 2 May 2016 19:16:56 +0000"  >&lt;p&gt;Sounds good to me. The default client heartbeat is 10 seconds, so writing a no-op every 10 seconds won&apos;t harm the precision of staleness calculations.&lt;/p&gt;</comment>
                            <comment id="1252178" author="milkie" created="Mon, 2 May 2016 17:12:26 +0000"  >&lt;p&gt;I think doing one write every 10 seconds during idle periods is a good compromise between resource consumption and idle time &quot;spikes&quot;.&lt;/p&gt;</comment>
                            <comment id="1245221" author="milkie" created="Mon, 25 Apr 2016 12:39:15 +0000"  >&lt;p&gt;Also, it should not log a no-op if anything was logged in the previous period.  That is, only idle (writing) primaries should be writing no-ops.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="282194">SERVER-23908</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="408556">SERVER-30339</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="397153">SERVER-29802</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="282052">SERVER-23893</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="30426">SERVER-4936</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="67398">SERVER-8858</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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000tTwFEQA0]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 25 Apr 2016 12:39:15 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 24 weeks, 5 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-250</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_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 24 weeks, 5 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>jesse@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>misha.tyulenev@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrk9fz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrcikv:</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="1016">Sharding 18 (08/05/16)</customfieldvalue>
    <customfieldvalue id="1017">Sharding 2016-08-29</customfieldvalue>
    <customfieldvalue id="1234">Sharding 2016-09-19</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_11861" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>User Summary</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11856"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsezyf:</customfieldvalue>

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