user3895930
user3895930

Reputation: 29

No Primary during config change for slaveDelay from 86400 to 0

We have 6 node clusters. Three hidden nodes, two nodes to 24 hours delay.

ecset01:PRIMARY> cfg.members[5].slaveDelay = 0
0
ecset01:PRIMARY> rs.reconfig(cfg)
Mon Jan 12 11:30:15.802 DBClientCursor::init call() failed
Mon Jan 12 11:30:15.804 trying reconnect to 127.0.0.1:27017
Mon Jan 12 11:30:15.804 reconnect 127.0.0.1:27017 ok
Mon Jan 12 11:30:16.007 DBClientCursor::init call() failed
Mon Jan 12 11:30:16.008 JavaScript execution failed: Error: DBClientBase::findN: transport error: 127.0.0.1:27017 ns: admin.$cmd query: { authenticate: 1, nonce: "fe555b6fcb676ba7", user: "admin", key: "a2d59cbc51cf8c61b4cb45b7f4f8db80" } at src/mongo/shell/query.js:L78
> 
Mon Jan 12 11:30:20.139 trying reconnect to 127.0.0.1:27017
Mon Jan 12 11:30:20.139 reconnect 127.0.0.1:27017 ok
ecset01:SECONDARY> 

I like to know how to change slaveDelay =0 without impacting Primary.

Upvotes: 0

Views: 52

Answers (1)

wdberkeley
wdberkeley

Reputation: 11671

You cannot. Reconfiguring the replica set can cause the primary to step down, causing a new election. The election will be brief if the replica set is healthy and you are only changing the delay, but you should still try to change configurations on your replica set during a maintenance window.

Upvotes: 1

Related Questions