<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:03:44 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-23559] Primary Member selection is not appropriate - the node having less data becomes primary </title>
                <link>https://jira.mongodb.org/browse/SERVER-23559</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Hello Team,&lt;/p&gt;

&lt;p&gt;I am not sure this comes in which category either in bug or improvement or something else.&lt;/p&gt;

&lt;p&gt;Version: 3.0.4&lt;br/&gt;
Storage Engine: MMAPV1&lt;/p&gt;

&lt;p&gt;I have a three-member replica set with 1 primary and 2 secondaries:&lt;/p&gt;

&lt;p&gt;A - Primary&lt;br/&gt;
B - Secondary&lt;br/&gt;
C - Secondary&lt;br/&gt;
Initially I had only one Member A and all CRUD operations were performed on it only.&lt;/p&gt;

&lt;p&gt;After some time I introduced 2 secondaries, B and C. Now again for some reason, secondaries were removed and rejoined in cluster.&lt;/p&gt;

&lt;p&gt;Then I have stepdown node A to make node C primary.&lt;/p&gt;

&lt;p&gt;Now it seems to be abnormal:&lt;/p&gt;

&lt;p&gt;Node A:&lt;br/&gt;
rs1:SECONDARY&amp;gt; show dbs&lt;br/&gt;
TEST  2136.457GB&lt;/p&gt;

&lt;p&gt;Node B:&lt;br/&gt;
rs1:PRIMARY&amp;gt; show dbs&lt;br/&gt;
TEST  351.329GB&lt;/p&gt;

&lt;p&gt;Node C:&lt;br/&gt;
rs1:SECONDARY&amp;gt; show dbs&lt;br/&gt;
TEST  2136.457GB &lt;/p&gt;

&lt;p&gt;-------------------------------&lt;/p&gt;

&lt;p&gt;Node  B becomes primary and now application is showing &quot;No data found error&quot;&lt;/p&gt;

&lt;p&gt;B becomes primary after failover, I made Node A primary manually.&lt;br/&gt;
but is this any criteria to check syncronization first and then elect for the Primary Node . Please suggest &lt;/p&gt;</description>
                <environment></environment>
        <key id="277765">SERVER-23559</key>
            <summary>Primary Member selection is not appropriate - the node having less data becomes primary </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="kelsey.schubert@mongodb.com">Kelsey Schubert</assignee>
                                    <reporter username="mangal.aayushi3@gmail.com">Aayushi Mangal</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Apr 2016 05:11:56 +0000</created>
                <updated>Mon, 15 Nov 2021 16:33:15 +0000</updated>
                            <resolved>Tue, 31 May 2016 16:55:04 +0000</resolved>
                                    <version>3.0.4</version>
                                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1274686" author="mangal.aayushi3@gmail.com" created="Wed, 25 May 2016 13:25:27 +0000"  >&lt;p&gt;Hello Fernandez,&lt;/p&gt;

&lt;p&gt;The issue has been resolved, I have did this:&lt;/p&gt;

&lt;p&gt;Stepdown the primary,&lt;br/&gt;
So I have new primary, then the previous primary became secondary.&lt;br/&gt;
And it was in sync now with the Primary.&lt;/p&gt;

&lt;p&gt;The only concern I have earlier was how this situation happens so that we&lt;br/&gt;
will take care from next time.&lt;/p&gt;

&lt;p&gt;Thank you for your response.&lt;br/&gt;
Regards:&lt;br/&gt;
Aayushi Mangal&lt;/p&gt;

&lt;p&gt;On Tue, May 24, 2016 at 10:47 PM, Ramon Fernandez (JIRA) &amp;lt;jira@mongodb.org&amp;gt;&lt;/p&gt;
</comment>
                            <comment id="1273733" author="ramon.fernandez" created="Tue, 24 May 2016 17:16:52 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=aayushi&quot; class=&quot;user-hover&quot; rel=&quot;aayushi&quot;&gt;aayushi&lt;/a&gt;, please have a look at &lt;a href=&quot;https://docs.mongodb.com/manual/reference/command/replSetGetStatus/#replsetgetstatus&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;replSetGetStatus()&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Please not that in order to investigate if there&apos;s a bug in MongoDB we need the logs that Thomas requested above. If you&apos;re interested in pursuing this issue please upload the complete logs for all replica set members.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                            <comment id="1227290" author="mangal.aayushi3@gmail.com" created="Wed, 6 Apr 2016 10:56:49 +0000"  >&lt;p&gt;Thanks Thomas for the revert, would you please let me know how to check for recent optime for the replicaset member.&lt;br/&gt;
I can see optime as : &quot;optime&quot; : Timestamp(1459939986, 700)&lt;/p&gt;</comment>
                            <comment id="1227176" author="thomas.schubert" created="Wed, 6 Apr 2016 07:00:41 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=aayushi&quot; class=&quot;user-hover&quot; rel=&quot;aayushi&quot;&gt;aayushi&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;A replica set member should not become primary unless it has the most &lt;a href=&quot;https://docs.mongodb.org/v3.0/core/replica-set-elections/#optime&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;recent optime&lt;/a&gt; of any visible member. To continue to investigate this issue, can you please upload the complete logs for each of the replica set members?&lt;/p&gt;

&lt;p&gt;Thank you,&lt;br/&gt;
Thomas&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 6 Apr 2016 07:00:41 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 38 weeks 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>mangal.aayushi3@gmail.com</customfieldvalue>
            <customfieldvalue>kelsey.schubert@mongodb.com</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrkbbj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsk51r:</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Mentioned above&lt;/p&gt;</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>
                                    <customfieldvalue><![CDATA[kelsey.schubert@mongodb.com]]></customfieldvalue>
    

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

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