How to promote hidden mongo node to primary?Start mongod instance on replica set as background jobHow to read...

Is it normal that my co-workers at a fitness company criticize my food choices?

Problem with FindRoot

Do the common programs (for example: "ls", "cat") in Linux and BSD come from the same source code?

Why do passenger jet manufacturers design their planes with stall prevention systems?

Why is a white electrical wire connected to 2 black wires?

How could an airship be repaired midflight?

Examples of transfinite towers

Tikz picture of two mathematical functions

Book about superhumans hiding among normal humans

Aluminum electrolytic or ceramic capacitors for linear regulator input and output?

Knife as defense against stray dogs

Are Roman Catholic priests ever addressed as pastor

What is the Japanese sound word for the clinking of money?

As a new Ubuntu desktop 18.04 LTS user, do I need to use ufw for a firewall or is iptables sufficient?

How to make healing in an exploration game interesting

Describing a chess game in a novel

Instead of a Universal Basic Income program, why not implement a "Universal Basic Needs" program?

Adventure Game (text based) in C++

ERC721: How to get the owned tokens of an address

Why one should not leave fingerprints on bulbs and plugs?

Why is the President allowed to veto a cancellation of emergency powers?

How do I change two letters closest to a string and one letter immediately after a string using Notepad++?

What is a ^ b and (a & b) << 1?

Why does a Star of David appear at a rally with Francisco Franco?



How to promote hidden mongo node to primary?


Start mongod instance on replica set as background jobHow to read from Mongodb secondary Only in a replica set?Does a hidden member count toward and operate as part of a write_concern majority in MongoDB 2.6?how to change primary node on mongo replica set without losing cursorMongoDB secondary node does not become primary when other nodes are stoppedMongoDB failover when master is stuck on IOWait?MongoDB hidden node still receiving connectionsnode-mongodb-native driver only reads from primary, regardless of URI readPreferenceMongoDB auto fail-over not working3 Node mongo db authentication setup fails













3















We are trying to implement DR setup for our mongodb replica set and currently three nodes in DR are configured to run as hidden nodes. We are trying to test failover to DR which will require promoting hidden node to primary and secondary respectively. What is the best way to achieve this?










share|improve this question














bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • ,Welcome to the StackExchange site. what is MongoDB version(x,y,z)?

    – Md Haidar Ali Khan
    Nov 14 '18 at 4:56











  • mongo version is 3.0.4. Currently I am trying to reset the hidden flag and priority of hidden nodes to make them eligible for voting and become primary (by assigning high weight) followed by reconfiguration of replica set. It's working but am not sure if its right way to do it.

    – Sweeti Bharti
    Nov 14 '18 at 5:11











  • I have update the answer according to priority of hidden node. For hidden node always priority will be "0" with "hidden": true in member configuration. Also I written the "Configuration procedure" for hidden member.

    – Md Haidar Ali Khan
    Nov 14 '18 at 5:17
















3















We are trying to implement DR setup for our mongodb replica set and currently three nodes in DR are configured to run as hidden nodes. We are trying to test failover to DR which will require promoting hidden node to primary and secondary respectively. What is the best way to achieve this?










share|improve this question














bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • ,Welcome to the StackExchange site. what is MongoDB version(x,y,z)?

    – Md Haidar Ali Khan
    Nov 14 '18 at 4:56











  • mongo version is 3.0.4. Currently I am trying to reset the hidden flag and priority of hidden nodes to make them eligible for voting and become primary (by assigning high weight) followed by reconfiguration of replica set. It's working but am not sure if its right way to do it.

    – Sweeti Bharti
    Nov 14 '18 at 5:11











  • I have update the answer according to priority of hidden node. For hidden node always priority will be "0" with "hidden": true in member configuration. Also I written the "Configuration procedure" for hidden member.

    – Md Haidar Ali Khan
    Nov 14 '18 at 5:17














3












3








3


1






We are trying to implement DR setup for our mongodb replica set and currently three nodes in DR are configured to run as hidden nodes. We are trying to test failover to DR which will require promoting hidden node to primary and secondary respectively. What is the best way to achieve this?










share|improve this question














We are trying to implement DR setup for our mongodb replica set and currently three nodes in DR are configured to run as hidden nodes. We are trying to test failover to DR which will require promoting hidden node to primary and secondary respectively. What is the best way to achieve this?







mongodb






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 14 '18 at 4:43









Sweeti BhartiSweeti Bharti

161




161





bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • ,Welcome to the StackExchange site. what is MongoDB version(x,y,z)?

    – Md Haidar Ali Khan
    Nov 14 '18 at 4:56











  • mongo version is 3.0.4. Currently I am trying to reset the hidden flag and priority of hidden nodes to make them eligible for voting and become primary (by assigning high weight) followed by reconfiguration of replica set. It's working but am not sure if its right way to do it.

    – Sweeti Bharti
    Nov 14 '18 at 5:11











  • I have update the answer according to priority of hidden node. For hidden node always priority will be "0" with "hidden": true in member configuration. Also I written the "Configuration procedure" for hidden member.

    – Md Haidar Ali Khan
    Nov 14 '18 at 5:17



















  • ,Welcome to the StackExchange site. what is MongoDB version(x,y,z)?

    – Md Haidar Ali Khan
    Nov 14 '18 at 4:56











  • mongo version is 3.0.4. Currently I am trying to reset the hidden flag and priority of hidden nodes to make them eligible for voting and become primary (by assigning high weight) followed by reconfiguration of replica set. It's working but am not sure if its right way to do it.

    – Sweeti Bharti
    Nov 14 '18 at 5:11











  • I have update the answer according to priority of hidden node. For hidden node always priority will be "0" with "hidden": true in member configuration. Also I written the "Configuration procedure" for hidden member.

    – Md Haidar Ali Khan
    Nov 14 '18 at 5:17

















,Welcome to the StackExchange site. what is MongoDB version(x,y,z)?

– Md Haidar Ali Khan
Nov 14 '18 at 4:56





,Welcome to the StackExchange site. what is MongoDB version(x,y,z)?

– Md Haidar Ali Khan
Nov 14 '18 at 4:56













mongo version is 3.0.4. Currently I am trying to reset the hidden flag and priority of hidden nodes to make them eligible for voting and become primary (by assigning high weight) followed by reconfiguration of replica set. It's working but am not sure if its right way to do it.

– Sweeti Bharti
Nov 14 '18 at 5:11





mongo version is 3.0.4. Currently I am trying to reset the hidden flag and priority of hidden nodes to make them eligible for voting and become primary (by assigning high weight) followed by reconfiguration of replica set. It's working but am not sure if its right way to do it.

– Sweeti Bharti
Nov 14 '18 at 5:11













I have update the answer according to priority of hidden node. For hidden node always priority will be "0" with "hidden": true in member configuration. Also I written the "Configuration procedure" for hidden member.

– Md Haidar Ali Khan
Nov 14 '18 at 5:17





I have update the answer according to priority of hidden node. For hidden node always priority will be "0" with "hidden": true in member configuration. Also I written the "Configuration procedure" for hidden member.

– Md Haidar Ali Khan
Nov 14 '18 at 5:17










2 Answers
2






active

oldest

votes


















0















We are trying to implement DR setup for our mongodb replica set and
currently three nodes in DR are configured to run as hidden nodes.




As per MongoDB documentation Configure a Hidden Replica Set Member Hidden members are part of a replica set but cannot become primary and are invisible to client applications. Hidden members may vote in elections.



The most common use of hidden nodes is to support delayed members. If you only need to prevent a member from becoming primary, configure a priority 0 member.



Member Configuration Document



To configure a secondary member as hidden, set its members[n].priority value to 0 and set its members[n].hidden value to true in its member configuration:



{
"_id" : <num>
"host" : <hostname:port>,
"priority" : 0,
"hidden" : true
}


Configuration Procedure



The following example hides the secondary member currently at the index 0 in the members array. To configure a hidden member, use the following sequence of operations in a mongo shell connected to the primary, specifying the member to configure by its array index in the members array:



cfg = rs.conf()
cfg.members[0].priority = 0
cfg.members[0].hidden = true
rs.reconfig(cfg)


After re-configuring the set, this secondary member has a priority of 0 so that it cannot become primary and is hidden. The other members in the set will not advertise the hidden member in the isMaster or db.isMaster() output.




We are trying to test failover to DR which will require promoting
hidden node to primary and secondary respectively. What is the best
way to achieve this?




Note with WARNING:




  • The rs.reconfig()
    shell method can force the current primary to step down, which causes
    an election.
    When the primary steps down, the mongod
    closes all client connections. While this typically takes 10-20
    seconds, try to make these changes during scheduled maintenance
    periods.

  • Avoid reconfiguring replica sets that contain members of different
    MongoDB versions as validation rules may differ across MongoDB
    versions.






share|improve this answer
























  • Thanks Haidar for confirming the approach. Will keep in mind the warnings.

    – Sweeti Bharti
    Nov 14 '18 at 5:26











  • @SweetiBharti, You can update your answer , as someone future reference.

    – Md Haidar Ali Khan
    Nov 14 '18 at 5:40



















0














I was able to achieve it via using below code snippet:



import pymongo
client = pymongo.MongoClient()
cfgDict = client.local.system.replset.find_one()
for mem in cfgDict['members']:
if(mem.get('host') == "hidden-node-1:27017"):
mem['hidden'] = False
mem['priority'] = 20 #assign highest priority
elif(mem.get('host') == "hidden-node-2:27017"):
mem['hidden'] = False
mem['priority'] = 5
else:
print("NO MATCH FOUND... NOTHING TO RECONFIGURE!")
try:
client.admin.command({'replSetReconfig': cfgDict}, force=True)
except pymongo.errors.ConnectionFailure:
pass





share|improve this answer
























  • Instead of using forced reconfiguration, it would be preferable to have non-hidden members with priorities to allow the normal replica set election & failover process to determine the primary. Forced reconfiguration is only intended as a last resort to reconfigure a replica set with unavailable members. As noted on the documentation page: "Use this procedure only to recover from catastrophic interruptions. Do not use force every time you reconfigure. Also, do not use the force option in any automatic scripts and do not use force when there is still a primary."

    – Stennie
    Dec 31 '18 at 3:20











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f222485%2fhow-to-promote-hidden-mongo-node-to-primary%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0















We are trying to implement DR setup for our mongodb replica set and
currently three nodes in DR are configured to run as hidden nodes.




As per MongoDB documentation Configure a Hidden Replica Set Member Hidden members are part of a replica set but cannot become primary and are invisible to client applications. Hidden members may vote in elections.



The most common use of hidden nodes is to support delayed members. If you only need to prevent a member from becoming primary, configure a priority 0 member.



Member Configuration Document



To configure a secondary member as hidden, set its members[n].priority value to 0 and set its members[n].hidden value to true in its member configuration:



{
"_id" : <num>
"host" : <hostname:port>,
"priority" : 0,
"hidden" : true
}


Configuration Procedure



The following example hides the secondary member currently at the index 0 in the members array. To configure a hidden member, use the following sequence of operations in a mongo shell connected to the primary, specifying the member to configure by its array index in the members array:



cfg = rs.conf()
cfg.members[0].priority = 0
cfg.members[0].hidden = true
rs.reconfig(cfg)


After re-configuring the set, this secondary member has a priority of 0 so that it cannot become primary and is hidden. The other members in the set will not advertise the hidden member in the isMaster or db.isMaster() output.




We are trying to test failover to DR which will require promoting
hidden node to primary and secondary respectively. What is the best
way to achieve this?




Note with WARNING:




  • The rs.reconfig()
    shell method can force the current primary to step down, which causes
    an election.
    When the primary steps down, the mongod
    closes all client connections. While this typically takes 10-20
    seconds, try to make these changes during scheduled maintenance
    periods.

  • Avoid reconfiguring replica sets that contain members of different
    MongoDB versions as validation rules may differ across MongoDB
    versions.






share|improve this answer
























  • Thanks Haidar for confirming the approach. Will keep in mind the warnings.

    – Sweeti Bharti
    Nov 14 '18 at 5:26











  • @SweetiBharti, You can update your answer , as someone future reference.

    – Md Haidar Ali Khan
    Nov 14 '18 at 5:40
















0















We are trying to implement DR setup for our mongodb replica set and
currently three nodes in DR are configured to run as hidden nodes.




As per MongoDB documentation Configure a Hidden Replica Set Member Hidden members are part of a replica set but cannot become primary and are invisible to client applications. Hidden members may vote in elections.



The most common use of hidden nodes is to support delayed members. If you only need to prevent a member from becoming primary, configure a priority 0 member.



Member Configuration Document



To configure a secondary member as hidden, set its members[n].priority value to 0 and set its members[n].hidden value to true in its member configuration:



{
"_id" : <num>
"host" : <hostname:port>,
"priority" : 0,
"hidden" : true
}


Configuration Procedure



The following example hides the secondary member currently at the index 0 in the members array. To configure a hidden member, use the following sequence of operations in a mongo shell connected to the primary, specifying the member to configure by its array index in the members array:



cfg = rs.conf()
cfg.members[0].priority = 0
cfg.members[0].hidden = true
rs.reconfig(cfg)


After re-configuring the set, this secondary member has a priority of 0 so that it cannot become primary and is hidden. The other members in the set will not advertise the hidden member in the isMaster or db.isMaster() output.




We are trying to test failover to DR which will require promoting
hidden node to primary and secondary respectively. What is the best
way to achieve this?




Note with WARNING:




  • The rs.reconfig()
    shell method can force the current primary to step down, which causes
    an election.
    When the primary steps down, the mongod
    closes all client connections. While this typically takes 10-20
    seconds, try to make these changes during scheduled maintenance
    periods.

  • Avoid reconfiguring replica sets that contain members of different
    MongoDB versions as validation rules may differ across MongoDB
    versions.






share|improve this answer
























  • Thanks Haidar for confirming the approach. Will keep in mind the warnings.

    – Sweeti Bharti
    Nov 14 '18 at 5:26











  • @SweetiBharti, You can update your answer , as someone future reference.

    – Md Haidar Ali Khan
    Nov 14 '18 at 5:40














0












0








0








We are trying to implement DR setup for our mongodb replica set and
currently three nodes in DR are configured to run as hidden nodes.




As per MongoDB documentation Configure a Hidden Replica Set Member Hidden members are part of a replica set but cannot become primary and are invisible to client applications. Hidden members may vote in elections.



The most common use of hidden nodes is to support delayed members. If you only need to prevent a member from becoming primary, configure a priority 0 member.



Member Configuration Document



To configure a secondary member as hidden, set its members[n].priority value to 0 and set its members[n].hidden value to true in its member configuration:



{
"_id" : <num>
"host" : <hostname:port>,
"priority" : 0,
"hidden" : true
}


Configuration Procedure



The following example hides the secondary member currently at the index 0 in the members array. To configure a hidden member, use the following sequence of operations in a mongo shell connected to the primary, specifying the member to configure by its array index in the members array:



cfg = rs.conf()
cfg.members[0].priority = 0
cfg.members[0].hidden = true
rs.reconfig(cfg)


After re-configuring the set, this secondary member has a priority of 0 so that it cannot become primary and is hidden. The other members in the set will not advertise the hidden member in the isMaster or db.isMaster() output.




We are trying to test failover to DR which will require promoting
hidden node to primary and secondary respectively. What is the best
way to achieve this?




Note with WARNING:




  • The rs.reconfig()
    shell method can force the current primary to step down, which causes
    an election.
    When the primary steps down, the mongod
    closes all client connections. While this typically takes 10-20
    seconds, try to make these changes during scheduled maintenance
    periods.

  • Avoid reconfiguring replica sets that contain members of different
    MongoDB versions as validation rules may differ across MongoDB
    versions.






share|improve this answer














We are trying to implement DR setup for our mongodb replica set and
currently three nodes in DR are configured to run as hidden nodes.




As per MongoDB documentation Configure a Hidden Replica Set Member Hidden members are part of a replica set but cannot become primary and are invisible to client applications. Hidden members may vote in elections.



The most common use of hidden nodes is to support delayed members. If you only need to prevent a member from becoming primary, configure a priority 0 member.



Member Configuration Document



To configure a secondary member as hidden, set its members[n].priority value to 0 and set its members[n].hidden value to true in its member configuration:



{
"_id" : <num>
"host" : <hostname:port>,
"priority" : 0,
"hidden" : true
}


Configuration Procedure



The following example hides the secondary member currently at the index 0 in the members array. To configure a hidden member, use the following sequence of operations in a mongo shell connected to the primary, specifying the member to configure by its array index in the members array:



cfg = rs.conf()
cfg.members[0].priority = 0
cfg.members[0].hidden = true
rs.reconfig(cfg)


After re-configuring the set, this secondary member has a priority of 0 so that it cannot become primary and is hidden. The other members in the set will not advertise the hidden member in the isMaster or db.isMaster() output.




We are trying to test failover to DR which will require promoting
hidden node to primary and secondary respectively. What is the best
way to achieve this?




Note with WARNING:




  • The rs.reconfig()
    shell method can force the current primary to step down, which causes
    an election.
    When the primary steps down, the mongod
    closes all client connections. While this typically takes 10-20
    seconds, try to make these changes during scheduled maintenance
    periods.

  • Avoid reconfiguring replica sets that contain members of different
    MongoDB versions as validation rules may differ across MongoDB
    versions.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 14 '18 at 5:12









Md Haidar Ali KhanMd Haidar Ali Khan

3,74262442




3,74262442













  • Thanks Haidar for confirming the approach. Will keep in mind the warnings.

    – Sweeti Bharti
    Nov 14 '18 at 5:26











  • @SweetiBharti, You can update your answer , as someone future reference.

    – Md Haidar Ali Khan
    Nov 14 '18 at 5:40



















  • Thanks Haidar for confirming the approach. Will keep in mind the warnings.

    – Sweeti Bharti
    Nov 14 '18 at 5:26











  • @SweetiBharti, You can update your answer , as someone future reference.

    – Md Haidar Ali Khan
    Nov 14 '18 at 5:40

















Thanks Haidar for confirming the approach. Will keep in mind the warnings.

– Sweeti Bharti
Nov 14 '18 at 5:26





Thanks Haidar for confirming the approach. Will keep in mind the warnings.

– Sweeti Bharti
Nov 14 '18 at 5:26













@SweetiBharti, You can update your answer , as someone future reference.

– Md Haidar Ali Khan
Nov 14 '18 at 5:40





@SweetiBharti, You can update your answer , as someone future reference.

– Md Haidar Ali Khan
Nov 14 '18 at 5:40













0














I was able to achieve it via using below code snippet:



import pymongo
client = pymongo.MongoClient()
cfgDict = client.local.system.replset.find_one()
for mem in cfgDict['members']:
if(mem.get('host') == "hidden-node-1:27017"):
mem['hidden'] = False
mem['priority'] = 20 #assign highest priority
elif(mem.get('host') == "hidden-node-2:27017"):
mem['hidden'] = False
mem['priority'] = 5
else:
print("NO MATCH FOUND... NOTHING TO RECONFIGURE!")
try:
client.admin.command({'replSetReconfig': cfgDict}, force=True)
except pymongo.errors.ConnectionFailure:
pass





share|improve this answer
























  • Instead of using forced reconfiguration, it would be preferable to have non-hidden members with priorities to allow the normal replica set election & failover process to determine the primary. Forced reconfiguration is only intended as a last resort to reconfigure a replica set with unavailable members. As noted on the documentation page: "Use this procedure only to recover from catastrophic interruptions. Do not use force every time you reconfigure. Also, do not use the force option in any automatic scripts and do not use force when there is still a primary."

    – Stennie
    Dec 31 '18 at 3:20
















0














I was able to achieve it via using below code snippet:



import pymongo
client = pymongo.MongoClient()
cfgDict = client.local.system.replset.find_one()
for mem in cfgDict['members']:
if(mem.get('host') == "hidden-node-1:27017"):
mem['hidden'] = False
mem['priority'] = 20 #assign highest priority
elif(mem.get('host') == "hidden-node-2:27017"):
mem['hidden'] = False
mem['priority'] = 5
else:
print("NO MATCH FOUND... NOTHING TO RECONFIGURE!")
try:
client.admin.command({'replSetReconfig': cfgDict}, force=True)
except pymongo.errors.ConnectionFailure:
pass





share|improve this answer
























  • Instead of using forced reconfiguration, it would be preferable to have non-hidden members with priorities to allow the normal replica set election & failover process to determine the primary. Forced reconfiguration is only intended as a last resort to reconfigure a replica set with unavailable members. As noted on the documentation page: "Use this procedure only to recover from catastrophic interruptions. Do not use force every time you reconfigure. Also, do not use the force option in any automatic scripts and do not use force when there is still a primary."

    – Stennie
    Dec 31 '18 at 3:20














0












0








0







I was able to achieve it via using below code snippet:



import pymongo
client = pymongo.MongoClient()
cfgDict = client.local.system.replset.find_one()
for mem in cfgDict['members']:
if(mem.get('host') == "hidden-node-1:27017"):
mem['hidden'] = False
mem['priority'] = 20 #assign highest priority
elif(mem.get('host') == "hidden-node-2:27017"):
mem['hidden'] = False
mem['priority'] = 5
else:
print("NO MATCH FOUND... NOTHING TO RECONFIGURE!")
try:
client.admin.command({'replSetReconfig': cfgDict}, force=True)
except pymongo.errors.ConnectionFailure:
pass





share|improve this answer













I was able to achieve it via using below code snippet:



import pymongo
client = pymongo.MongoClient()
cfgDict = client.local.system.replset.find_one()
for mem in cfgDict['members']:
if(mem.get('host') == "hidden-node-1:27017"):
mem['hidden'] = False
mem['priority'] = 20 #assign highest priority
elif(mem.get('host') == "hidden-node-2:27017"):
mem['hidden'] = False
mem['priority'] = 5
else:
print("NO MATCH FOUND... NOTHING TO RECONFIGURE!")
try:
client.admin.command({'replSetReconfig': cfgDict}, force=True)
except pymongo.errors.ConnectionFailure:
pass






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 14 '18 at 5:50









Sweeti BhartiSweeti Bharti

161




161













  • Instead of using forced reconfiguration, it would be preferable to have non-hidden members with priorities to allow the normal replica set election & failover process to determine the primary. Forced reconfiguration is only intended as a last resort to reconfigure a replica set with unavailable members. As noted on the documentation page: "Use this procedure only to recover from catastrophic interruptions. Do not use force every time you reconfigure. Also, do not use the force option in any automatic scripts and do not use force when there is still a primary."

    – Stennie
    Dec 31 '18 at 3:20



















  • Instead of using forced reconfiguration, it would be preferable to have non-hidden members with priorities to allow the normal replica set election & failover process to determine the primary. Forced reconfiguration is only intended as a last resort to reconfigure a replica set with unavailable members. As noted on the documentation page: "Use this procedure only to recover from catastrophic interruptions. Do not use force every time you reconfigure. Also, do not use the force option in any automatic scripts and do not use force when there is still a primary."

    – Stennie
    Dec 31 '18 at 3:20

















Instead of using forced reconfiguration, it would be preferable to have non-hidden members with priorities to allow the normal replica set election & failover process to determine the primary. Forced reconfiguration is only intended as a last resort to reconfigure a replica set with unavailable members. As noted on the documentation page: "Use this procedure only to recover from catastrophic interruptions. Do not use force every time you reconfigure. Also, do not use the force option in any automatic scripts and do not use force when there is still a primary."

– Stennie
Dec 31 '18 at 3:20





Instead of using forced reconfiguration, it would be preferable to have non-hidden members with priorities to allow the normal replica set election & failover process to determine the primary. Forced reconfiguration is only intended as a last resort to reconfigure a replica set with unavailable members. As noted on the documentation page: "Use this procedure only to recover from catastrophic interruptions. Do not use force every time you reconfigure. Also, do not use the force option in any automatic scripts and do not use force when there is still a primary."

– Stennie
Dec 31 '18 at 3:20


















draft saved

draft discarded




















































Thanks for contributing an answer to Database Administrators Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f222485%2fhow-to-promote-hidden-mongo-node-to-primary%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Anexo:Material bélico de la Fuerza Aérea de Chile Índice Aeronaves Defensa...

Always On Availability groups resolving state after failover - Remote harden of transaction...

update json value to null Announcing the arrival of Valued Associate #679: Cesar Manara ...