[SERVER-1940] implement { replSetFreeze : <bool> } please Created: 13/Oct/10  Updated: 12/Jul/16  Resolved: 26/Oct/10

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 1.7.2

Type: New Feature Priority: Major - P3
Reporter: Kenny Gorman Assignee: Kristina Chodorow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

We needed today the ability to freeze a set and have no decisions made on elections for some period of time. The exact issue was our code started blowing up the # of connections. We wanted to restart the master w/o having a slave pick up. We could bring down each slave first, but it would be nice just to tell the 'cluster' to not make any decisions on the cluster, but when we tried that we got:

Wed Oct 13 14:40:28 git version: aef371ecf5d2a824f16ccdc3b745f3702165602f
Wed Oct 13 14:40:28 sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41
Wed Oct 13 14:40:28 exception in initAndListen std::exception: old lock file, terminating
Wed Oct 13 14:40:28 dbexit:

Wed Oct 13 14:40:28 shutdown: going to close listening sockets...
Wed Oct 13 14:40:28 shutdown: going to flush oplog...
Wed Oct 13 14:40:28 shutdown: going to close sockets...
Wed Oct 13 14:40:28 shutdown: waiting for fs preallocator...
Wed Oct 13 14:40:28 shutdown: closing all files...
Wed Oct 13 14:40:28 closeAllFiles() finished

Wed Oct 13 14:40:28 dbexit: really exiting now



 Comments   
Comment by Kenny Gorman [ 26/Oct/10 ]

Yeah, this mode of operation is fine, and probably better so we don't forget to unfreeze. If it can happen, it will.

Comment by auto [ 26/Oct/10 ]

Author:

{'login': 'kchodorow', 'name': 'Kristina Chodorow', 'email': 'kristina@10gen.com'}

Message: replsetfreeze test SERVER-1940
http://github.com/mongodb/mongo/commit/ac2dc245b272e3d84a110b3f7120416d52ee26d5

Comment by Eliot Horowitz (Inactive) [ 26/Oct/10 ]

Kristina - can you add a test

Comment by Dwight Merriman [ 15/Oct/10 ]

see below. the behavior may be different than what you expect - but this is easy and safe? each member should be sent the command. thoughts?

virtual void help( stringstream &help ) const {
help << "

{ replSetFreeze : <seconds> }

";
help << "'freeze' state of member to the extent we can do that. What this really means is that\n";
help << "this node will not attempt to become primary until the time period specified expires.\n";
help << "You can call again with

{replSetFreeze:0}

to unfreeze sooner.\n";
help << "\nhttp://www.mongodb.org/display/DOCS/Replica+Set+Commands";
}

Comment by auto [ 15/Oct/10 ]

Author:

{'login': 'dwight', 'name': 'Dwight', 'email': 'dwight@10gen.com'}

Message: rs replSetFreeze needs testing still SERVER-1940
http://github.com/mongodb/mongo/commit/f222057f5358c91e5ec002ad4d3bf262c1303fc7

Comment by Kenny Gorman [ 13/Oct/10 ]

just to be a bit more clear.

we tried bringing down the slaves first, then finally the master. The above error message was generated on the master when we finally went to bring it down.

Generated at Thu Feb 08 02:58:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.