<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:58:17 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-21744] Clients may fail to discover new primaries when clock skew between nodes is greater than electionTimeout</title>
                <link>https://jira.mongodb.org/browse/SERVER-21744</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Assume there exist two nodes in a set (A and B) and that node A&apos;s clock is X seconds ahead of node B&apos;s clock. If node A is elected and then node B is elected within X seconds of node A being elected, node B&apos;s electionId will be less than node A&apos;s electionId, since it happened &quot;earlier.&quot;&lt;/p&gt;</description>
                <environment></environment>
        <key id="241967">SERVER-21744</key>
            <summary>Clients may fail to discover new primaries when clock skew between nodes is greater than electionTimeout</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="siyuan.zhou@mongodb.com">Siyuan Zhou</assignee>
                                    <reporter username="matt.dannenberg">Matt Dannenberg</reporter>
                        <labels>
                            <label>code-and-test</label>
                    </labels>
                <created>Wed, 2 Dec 2015 21:07:46 +0000</created>
                <updated>Wed, 25 Jan 2017 21:59:34 +0000</updated>
                            <resolved>Wed, 13 Jan 2016 21:08:31 +0000</resolved>
                                    <version>3.2.0-rc5</version>
                                    <fixVersion>3.2.3</fixVersion>
                    <fixVersion>3.3.1</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>19</watches>
                                                                                                                <comments>
                            <comment id="1132723" author="xgen-internal-githook" created="Tue, 12 Jan 2016 19:31:09 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;visualzhou&apos;, u&apos;name&apos;: u&apos;Siyuan Zhou&apos;, u&apos;email&apos;: u&apos;siyuan.zhou@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-21744&quot; title=&quot;Clients may fail to discover new primaries when clock skew between nodes is greater than electionTimeout&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-21744&quot;&gt;&lt;del&gt;SERVER-21744&lt;/del&gt;&lt;/a&gt; ElectionID always increases under PV0 and PV1.&lt;/p&gt;

&lt;p&gt;Reset election id on PV upgrade and downgrade.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 1c28e37982441275cc127853985b30f2c6e74ff5)&lt;br/&gt;
Branch: v3.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/21a507148d36d9adabcf105ac87a34f4f2007821&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/21a507148d36d9adabcf105ac87a34f4f2007821&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1131802" author="xgen-internal-githook" created="Mon, 11 Jan 2016 22:34:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;visualzhou&apos;, u&apos;name&apos;: u&apos;Siyuan Zhou&apos;, u&apos;email&apos;: u&apos;siyuan.zhou@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-21744&quot; title=&quot;Clients may fail to discover new primaries when clock skew between nodes is greater than electionTimeout&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-21744&quot;&gt;&lt;del&gt;SERVER-21744&lt;/del&gt;&lt;/a&gt; ElectionID always increases under PV0 and PV1.&lt;/p&gt;

&lt;p&gt;Reset election id on PV upgrade and downgrade.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1c28e37982441275cc127853985b30f2c6e74ff5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1c28e37982441275cc127853985b30f2c6e74ff5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1105612" author="milkie" created="Fri, 4 Dec 2015 16:16:11 +0000"  >&lt;p&gt;A refinement to my idea:  we can update the electionId twice, to avoid the increase in failover time.  Immediately after being elected, a node can set the electionId time to be the time of the last committed op it currently has.  Then, when it succeeds in committing its first op written, it can update the electionId time again.&lt;/p&gt;</comment>
                            <comment id="1105590" author="mattd@10gen.com" created="Fri, 4 Dec 2015 16:00:14 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.golden&quot; class=&quot;user-hover&quot; rel=&quot;david.golden&quot;&gt;david.golden&lt;/a&gt; A potential flaw with your proposed solution:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Node A becomes PRIMARY with setVersion 2, which has protocolVersion 1 and receives an 0xFFFF electionId.&lt;/li&gt;
	&lt;li&gt;Reconfig changes setVersion to 3 and protocolVersion to 0.&lt;/li&gt;
	&lt;li&gt;Driver comes online and sees the 0xFFFF electionId with setVersion 3.&lt;/li&gt;
	&lt;li&gt;Node B is elected with setVersion 3 and new electionId based on the time.&lt;/li&gt;
	&lt;li&gt;Driver never acknowledges node B as primary.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1105469" author="milkie" created="Fri, 4 Dec 2015 13:52:28 +0000"  >&lt;p&gt;Jeff, I believe you are correct; that&apos;s indeed a flaw.  &lt;br/&gt;
If the new primary waited until its first logged entry was committed before setting and broadcasting the electionId, that would solve this.  It would increase failover time significantly, but only for clients that were not doing w:majority writes.  For w:majority writes, the failover time would be increased by a small amount (the time it takes to do the write on the primary, without waiting for replication).&lt;/p&gt;</comment>
                            <comment id="1105103" author="jeff.yemin" created="Fri, 4 Dec 2015 01:03:32 +0000"  >&lt;blockquote&gt;&lt;p&gt;Proposed solution: use the time from the global optime generator instead of the system time to put in the OID first four bytes. This should result in an ever-increasing electionId, since optimes are guaranteed to be ever-increasing&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Using the global optime generator, could there be split-brain situations which result in a client seeing election ids go back in time?  For instance, a primary could broadcast an election id based on its view of the oplog, and then a new primary is elected which has no knowledge of that optime and broadcasts an older election id.  A client that can reach both the old and the new primary could witness both election ids and therefore fail to recognize the new primary.&lt;/p&gt;</comment>
                            <comment id="1104997" author="milkie" created="Thu, 3 Dec 2015 23:13:20 +0000"  >&lt;p&gt;I&apos;m sorry if I missed it, but what was the argument against my original solution?&lt;/p&gt;</comment>
                            <comment id="1104904" author="schwerin" created="Thu, 3 Dec 2015 21:55:33 +0000"  >&lt;p&gt;I think we should take &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=milkie&quot; class=&quot;user-hover&quot; rel=&quot;milkie&quot;&gt;milkie&lt;/a&gt;&apos;s suggestion of setting the high bits for pv1 election ids to 0xFFFF. We can then make a minor modification to the SDAM spec that says if you see two primaries, one with the high bits set and to 0xFFFF and one without, you choose the one with the higher value in the ismaster setVersion field. Drivers and mongoses that don&apos;t adopt this change won&apos;t be able to do a rolling downgrade of protocol version from 1 to 0, but ones that do will be fine, and everyone can do a rolling upgrade from pv0 to pv1.&lt;/p&gt;</comment>
                            <comment id="1103848" author="schwerin" created="Wed, 2 Dec 2015 23:27:38 +0000"  >&lt;p&gt;If we make downgrade the tricky direction, maybe we can also train the drivers to recover from it.&lt;/p&gt;</comment>
                            <comment id="1103845" author="milkie" created="Wed, 2 Dec 2015 23:22:41 +0000"  >&lt;p&gt;We can make the electionId simply the term and give it a BSON type of OID, but it means the first election you have after upgrading to pv1 will not trigger drivers to use the new primary. &lt;br/&gt;
Or, we could fill in the time bytes of the OID with FFFFFF and leave the rest of the bytes as the term, but this just means the first election after a downgrade to pv0 will not trigger drivers to use the new primary. &lt;/p&gt;</comment>
                            <comment id="1103772" author="schwerin" created="Wed, 2 Dec 2015 22:30:59 +0000"  >&lt;p&gt;For the new replication protocol (PV1), the election id should just be a clever encoding of the term number that is &quot;oid shaped&quot;, no? That is, it simply should not include wall clock time at all.&lt;/p&gt;</comment>
                            <comment id="1103666" author="milkie" created="Wed, 2 Dec 2015 21:26:46 +0000"  >&lt;p&gt;Proposed solution: use the time from the global optime generator instead of the system time to put in the OID first four bytes.  This should result in an ever-increasing electionId, since optimes are guaranteed to be ever-increasing.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                        <issuelink>
            <issuekey id="319579">DOCS-8940</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="242640">SERVER-21789</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="244048">DRIVERS-279</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="207150">SERVER-18717</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="202279">DRIVERS-228</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>12.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_12451" key="com.atlassian.jira.plugin.system.customfieldtypes:multiversion">
                        <customfieldname>Backport Completed</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="15909">3.2.3</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 2 Dec 2015 21:26:46 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 5 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_14262" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>End date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 13 Jan 2016 23:59:59 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>crystal.horn@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 5 weeks, 1 day ago
                        </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>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jeff.yemin@mongodb.com</customfieldvalue>
            <customfieldvalue>matt.dannenberg</customfieldvalue>
            <customfieldvalue>siyuan.zhou@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrkn4v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrdqan:</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="754">Repl D (12/11/15)</customfieldvalue>
    <customfieldvalue id="803">Repl E (01/08/16)</customfieldvalue>
    <customfieldvalue id="847">Repl F (01/29/16)</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_14261" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 2 Dec 2015 00:00:00 +0000</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|hrll67:</customfieldvalue>

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