[SERVER-9042] Shell calls GLE with w:1, which prints an error if the write was to the config servers Created: 20/Mar/13  Updated: 10/Dec/14  Resolved: 21/Mar/13

Status: Closed
Project: Core Server
Component/s: Sharding, Shell
Affects Version/s: 2.4.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-9050 configsvr + getLastError w:1 should n... Closed
Related
Operating System: ALL
Participants:

 Description   

If you do a write to the config database through mongos in 2.4 and the shell is in verbose mode, the shell prints a "norepl" error message.

> set verbose true
set verbose to true
> use config;
> db.settings.update({_id:'balancer'},{$set:{stopped:true}});
norepl
> 

We shouldn't use w:1 here, we should instead just not specify w at all. Alternatively, we could make GLE on config servers not return "norepl" when given a "w" field if the value of the "w" field is 1.



 Comments   
Comment by Spencer Brody (Inactive) [ 21/Mar/13 ]

This is a dup of SERVER-9050

Comment by Spencer Brody (Inactive) [ 21/Mar/13 ]

Yeah William, you're right, it's not just when the shell is in verbose mode. There's another line at https://github.com/mongodb/mongo/blob/master/src/mongo/shell/utils.js#L529 that calls GLE with w:1 when not in verbose mode.

Comment by Scott Hernandez (Inactive) [ 21/Mar/13 ]

We should def. fix the config servers not to say that for 0<w<2. "w:1" means the node written to so for config servers or any single instance this is just fine.

Comment by William Zola [ 21/Mar/13 ]

I am able to reproduce this without even turning on verbose mode:

mongos> use config
switched to db config
mongos> _verboseShell
false
mongos> db.settings.update({_id:"balancer"}, {$set:{stopped:false}});
norepl
mongos> 
mongos> set verbose off
set verbose to off
mongos> db.settings.update({_id:"balancer"}, {$set:{stopped:false}});
norepl
mongos>

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