<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:33:16 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-13909] Update Command Spec to include setVersion, electionId, lastOp, lastWriteDate</title>
                <link>https://jira.mongodb.org/browse/SERVER-13909</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Returning the current setVersion, electionId, lastOp, lastWriteDate would allow drivers to avoid pinging the server using ismaster continuously to establish the topology of the replicaset as well as provide monotonic read operations. &lt;/p&gt;

&lt;p&gt;In case of a primary election a new electionId would be returned and in the case of a new secondary being added or removed a new setVersion would be returned. &lt;/p&gt;

&lt;p&gt;If adding a new secondary that caused an election the server might return both a new setVersion and a new electionId. &lt;/p&gt;

&lt;p&gt;the lastOp field would allow for simpler monotonic read operations.&lt;br/&gt;
lastWriteDate could be used for staleness calculations.  It will become necessary to have it separate from lastOp once we remove the embedded timestamp from the lastOp field.&lt;/p&gt;</description>
                <environment></environment>
        <key id="136099">SERVER-13909</key>
            <summary>Update Command Spec to include setVersion, electionId, lastOp, lastWriteDate</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="david.golden@mongodb.com">David Golden</reporter>
                        <labels>
                    </labels>
                <created>Mon, 12 May 2014 19:37:34 +0000</created>
                <updated>Tue, 6 Dec 2022 05:06:07 +0000</updated>
                            <resolved>Fri, 5 Oct 2018 19:28:16 +0000</resolved>
                                                                    <component>Replication</component>
                                        <votes>3</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="2025449" author="greg.mckeon" created="Fri, 5 Oct 2018 19:28:16 +0000"  >&lt;p&gt;Closing this, since the corresponding drivers ticket is closed.&lt;/p&gt;</comment>
                            <comment id="1367023" author="milkie" created="Wed, 24 Aug 2016 19:22:44 +0000"  >&lt;p&gt;This is something I&apos;d still like to do.&lt;/p&gt;</comment>
                            <comment id="902506" author="milkie" created="Thu, 30 Apr 2015 19:20:33 +0000"  >&lt;p&gt;Note: in 3.2, the electionId will be composed from the node&apos;s current term.  It will still be in OID format and thus be comparable in the same way as in 3.0.&lt;/p&gt;</comment>
                            <comment id="606819" author="christkv" created="Tue, 3 Jun 2014 21:03:33 +0000"  >&lt;p&gt;Would it make sense to bump the wire protocol version for this ?&lt;/p&gt;</comment>
                            <comment id="583688" author="christkv" created="Wed, 14 May 2014 16:00:43 +0000"  >&lt;p&gt;this touched upon the election Id as well to be able to detect when a new primary has been elected.&lt;/p&gt;</comment>
                            <comment id="582082" author="david.golden" created="Tue, 13 May 2014 14:36:14 +0000"  >&lt;p&gt;I have mixed feelings about limiting to writes or (alternatively) limiting to any commands but on PRIMARY only.&lt;/p&gt;

&lt;p&gt;The goal for the driver is to detect that its view of the replica set config is stale.  Seeing a set version &lt;b&gt;higher&lt;/b&gt; than the last set version it received from a primary is an indication that something has changed and it would still need to query the primary for the correct config.&lt;/p&gt;

&lt;p&gt;So if a secondary has a lower set version, that gets ignored.  If a secondary has a higher set version, that means the primary needs to be checked.  So it wouldn&apos;t ever flap unless primary was flapping.&lt;/p&gt;

&lt;p&gt;However, in a separate, but related conversation, Matthias and Jesse discussed a race condition wherein a primary (A) is reconfigured and then is partitioned before it can propagate the config change to secondaries (B) and (C).  Assume we can still see all three, though.  In such a race, assume (B) and (C) elect (B) as the new primary, then we could see the set version reported by (B) be lower than the set version reported by (A) after it steps down.   That might cause extra requests to the (B) to see why (A) is reporting a higher version.&lt;/p&gt;

&lt;p&gt;Given that, I think it would be reasonable to limit set version reporting to the primary host only.  Any change in what the primary is reporting would be either a reconfig or a config-rollback.  Either way, it signals the driver to call ismaster and get a new view of the replica set config.&lt;/p&gt;</comment>
                            <comment id="582008" author="milkie" created="Tue, 13 May 2014 13:24:48 +0000"  >&lt;p&gt;When you say &quot;any command (e.g. writes)&quot;, this is incongruous since not all commands do writes.  I think if we amend the description to say &quot;commands that do writes&quot; return the replica set config version, this could work.  Since writing-commands can only successfully complete on a PRIMARY, using the replica set config version from such a command&apos;s response will be authoritative.&lt;br/&gt;
I think it could be problematic to include the config version for all commands, since secondaries may be unaware of a config change, and thus a driver might flap between two different configs if it were issuing commands to more than one node.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="277966">DRIVERS-298</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="207150">SERVER-18717</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="222421">SERVER-19554</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="130361">SERVER-13542</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.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_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>Mon, 12 May 2014 21:47:34 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 18 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_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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 18 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-repl</customfieldvalue>
            <customfieldvalue>christkv</customfieldvalue>
            <customfieldvalue>david.golden@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>greg.mckeon@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlv6f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrc8l3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>117132</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="1020">Repl 17 (07/15/16)</customfieldvalue>
    <customfieldvalue id="1021">Repl 18 (08/05/16)</customfieldvalue>
    <customfieldvalue id="1022">Repl 2016-08-29</customfieldvalue>
    <customfieldvalue id="1232">Repl 2016-10-10</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|hrlk7z:</customfieldvalue>

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