<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:38:27 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-56133] Why lastHeartbeatRecv don not updated </title>
                <link>https://jira.mongodb.org/browse/SERVER-56133</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Hi all i met a strange question .&lt;/p&gt;

&lt;p&gt;Mongodb version 4.0.12 community&lt;/p&gt;

&lt;p&gt;An replset with node A(primary node),B(sec node),C(sec node) i want to copy node B to new machine and then remove it .&lt;/p&gt;

&lt;p&gt;My detail operation is login the pri and set the node B priority is 0 and hidden is true then reconfig it . i see it work and node B transfer to hidden node , next login the node B and exec db.fsyncLock() , it also work , next i scp node B dir to new machine then start it success and add it in the replset .&lt;/p&gt;

&lt;p&gt;so as for now in the replset i have 4 nodes , ABCD ,but in the pri i exec rs.status() i see node B lastHeartbeatRecv still was t1(the time i add node C in the replset), and it won&apos;t changed . but lastHeartbeat is still change to the last.&lt;/p&gt;

&lt;p&gt;And if i exec rs.status() in the node B i just can see node A and node C i know it cause of node B was locked and can not update config , but in the result the node A and node C lastHeartbeat and lastHeartbeatRecv still was t1.&lt;/p&gt;

&lt;p&gt;I exec the db.setLogLevel(2,&quot;replication.heartbeats&quot;); in the pri node and i can see in the mongod.log the node B heartbeat request to node A .&lt;/p&gt;

&lt;p&gt;So why lastHeartbeatRecv is not updated in the node A and node C and node D ?&lt;/p&gt;</description>
                <environment></environment>
        <key id="1681417">SERVER-56133</key>
            <summary>Why lastHeartbeatRecv don not updated </summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</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="edwin.zhou@mongodb.com">Edwin Zhou</assignee>
                                    <reporter username="aaa15942975658@163.com">zhijia zhang</reporter>
                        <labels>
                    </labels>
                <created>Fri, 16 Apr 2021 03:43:32 +0000</created>
                <updated>Wed, 1 Jun 2022 17:13:26 +0000</updated>
                            <resolved>Thu, 22 Apr 2021 20:47:16 +0000</resolved>
                                    <version>3.4.14</version>
                    <version>4.0.12</version>
                                                    <component>Admin</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="3734284" author="JIRAUSER1257066" created="Thu, 22 Apr 2021 20:47:06 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=aaa15942975658%40163.com&quot; class=&quot;user-hover&quot; rel=&quot;aaa15942975658@163.com&quot;&gt;aaa15942975658@163.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;It appears that after running db.fsyncLock() on secondary B then adding a node to a replica set will cause this issue to occur. You will need to run db.fsyncUnlock() on the secondary B node.&lt;/p&gt;

&lt;p&gt;Since you are adding and removing nodes from a replica set, I recommend reviewing the documentation for &lt;a href=&quot;https://docs.mongodb.com/manual/tutorial/expand-replica-set/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;adding members to a replica set&lt;/a&gt; and &lt;a href=&quot;https://docs.mongodb.com/manual/tutorial/remove-replica-set-member/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;removing nodes from a replica set&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just as a reminder, the SERVER project is for bugs and feature suggestions for the MongoDB server. As this ticket does not appear to be a bug, I will now close it. If you need further assistance troubleshooting, I encourage you to ask our community by posting on the &lt;a href=&quot;https://community.mongodb.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;MongoDB Developer Community Forums&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Best,&lt;br/&gt;
Edwin&lt;/p&gt;</comment>
                            <comment id="3724129" author="JIRAUSER1269210" created="Mon, 19 Apr 2021 01:51:53 +0000"  >&lt;p&gt;the detail operation like this :&lt;br/&gt;
 in the primary node choose a sec node (NODEB)set the priority 0 and hidden true and reconfig it .&lt;/p&gt;

&lt;p&gt;a=rs.config()&lt;br/&gt;
 a.members&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;.priority=0&lt;br/&gt;
 a.members&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;.hidden=true&lt;br/&gt;
 rs.reconfig(a)&lt;/p&gt;

&lt;p&gt;then in the NODEB that was hidden exec &lt;br/&gt;
 db.fsyncLock()&lt;/p&gt;

&lt;p&gt;you can see whatever in the pri node and NODEB that config version was same and lastHeartbeat and lastHeartbeatRecv was still updated.&lt;/p&gt;

&lt;p&gt;next you can scp -r NODEB dir to the new machine and then start it and add it to the replset . TIME1&lt;/p&gt;

&lt;p&gt;after that you can exec rs.status in the pri node you will see that NODEB lastHeartbeat is still updated but lastHeartbeatRecv was TIME1 and will not change anymore.&lt;br/&gt;
 also you can exec rs.status in the NODEB and you will see pri node and sec node&apos;s lastHeartbeat and lastHeartbeatRecv was TIME1 and also not change anymore.&lt;/p&gt;

&lt;p&gt;i exec db.setLogLevel(2,&quot;replication.heartbeats&quot;); in the pri node and sec node . &lt;br/&gt;
 in the node log i can see NODEB send request to the pri node and also pri node will send response to the NODEB , &lt;br/&gt;
 so why lastHeartbeatRecv was not changed in the pri and other sec node ? and why in the NODEB pri and other sec lastHeartbeat and lastHeartbeatRecv was not changed&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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 22 Apr 2021 20:47:06 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 41 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>edwin.zhou@mongodb.com</customfieldvalue>
            <customfieldvalue>aaa15942975658@163.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hz5033:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hypzrz:</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_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[edwin.zhou@mongodb.com]]></customfieldvalue>
    

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

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