[SERVER-15241] replSetReconfig command asserts when one of the members has a priority setting Created: 12/Sep/14  Updated: 10/Dec/14  Resolved: 29/Sep/14

Status: Closed
Project: Core Server
Component/s: Replication, Shell
Affects Version/s: 2.7.6
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Jonathan Abrahams Assignee: Eric Milkie
Resolution: Done Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File repl.log    
Issue Links:
Related
is related to SERVER-15127 New test for replSetReconfig and writ... Closed
Operating System: ALL
Steps To Reproduce:

var replSet = new ReplSetTest({ name: 'reconfig', nodes: 3 });
replSet.startSet({nojournal: "" });
replSet.initiate();
var primary = replSet.getPrimary();
var conf = primary.getDB("local").system.replset.findOne();
conf.members[0].priority = 100;
conf.version++;
primary.adminCommand({replSetReconfig: conf});

Participants:

 Description   

If the command replSetReconfig is invoked with a member that has a priority setting, the command throws an error:

2014-09-12T13:12:10.609-0400 I QUERY Error: error doing query: failed
at DBQuery._exec (src/mongo/shell/query.js:83:36)
at DBQuery.hasNext (src/mongo/shell/query.js:114:10)
at DBCollection.findOne (src/mongo/shell/collection.js:185:19)
at DB.runCommand (src/mongo/shell/db.js:58:41)
at Mongo.adminCommand (src/mongo/shell/mongo.js:52:34)
at reconfigReplSet (/tmp/reconfig_wc.js:11:30)
at addTagset (/tmp/reconfig_wc.js:35:5)
at /tmp/reconfig_wc.js:227:1 at src/mongo/shell/collection.js:57



 Comments   
Comment by Eric Milkie [ 29/Sep/14 ]

In 2.7 we did change the shell to print stack traces upon all exceptions, mostly as an internal debugging aid for our unit tests.

Comment by Jonathan Abrahams [ 29/Sep/14 ]

You are correct, there is no difference in 2.6.4, or even 2.4. The resulting assert just looks different in the shell:

2.4.11:

Mon Sep 29 09:27:50.005 Error: error doing query: failed at src/mongo/shell/collection.js:53
failed to load: /tmp/repl.js

2.6.4:

2014-09-29T09:26:51.049-0400 Error: error doing query: failed at src/mongo/shell/query.js:
81
failed to load: /tmp/repl.js

2.7.6

2014-09-29T09:25:31.349-0400 I QUERY    Error: error doing query: failed
    at DBQuery._exec (src/mongo/shell/query.js:83:36)
    at DBQuery.hasNext (src/mongo/shell/query.js:114:10)
    at DBCollection.findOne (src/mongo/shell/collection.js:185:19)
    at DB.runCommand (src/mongo/shell/db.js:58:41)
    at Mongo.adminCommand (src/mongo/shell/mongo.js:52:34)
    at /tmp/repl.js:8:9 at src/mongo/shell/query.js:83
failed to load: /tmp/repl.js

Comment by Eric Milkie [ 29/Sep/14 ]

Can you attach a server log from a 2.6.4 run? It's unlikely the shell has changed in 2.7 so I am guessing it's something different server side.

Comment by Eric Milkie [ 29/Sep/14 ]

It looks like everything is working as designed. Since your new configuration causes the primary to immediately step down, it closes the connection with your driver (the shell). Subsequently, the shell reports a query failure due to the disconnected socket.

Comment by Jonathan Abrahams [ 29/Sep/14 ]

Log from scenario attached

Comment by Eric Milkie [ 29/Sep/14 ]

jonathan.abrahams ramon.fernandez Can you post the command error text from the server log?

Generated at Thu Feb 08 03:37:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.