[SERVER-13009] group command does not fail in maintenance mode Created: 03/Mar/14  Updated: 10/Nov/15  Resolved: 24/Feb/15

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

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: RPL 0 3/13/15
Participants:

 Description   

This tests that group should fail:

https://github.com/mongodb/mongo/blob/r2.6.0-rc0/jstests/replsets/maintenance2.js#L51

However, the group command actually succeeds but the test still passes anyway because db here is undefined:

https://github.com/mongodb/mongo/blob/r2.6.0-rc0/jstests/replsets/maintenance2.js#L4

Note: the count command below actually fails with:

{ "note" : "from execCommand", "ok" : 0, "errmsg" : "node is recovering" } 



 Comments   
Comment by Matt Dannenberg [ 24/Feb/15 ]

The docs should mention that this is not allowed in maintenance mode (if they do not already).

Comment by Githook User [ 24/Feb/15 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-13009 make group command fail in maintenance mode and update replsets/maintenance2.js
Branch: master
https://github.com/mongodb/mongo/commit/c51943618cfbf14e95582d369eb7f763b4a01628

Comment by Eric Milkie [ 23/Feb/15 ]

To improve this test, we should not use the shell helpers for group and count; running the explicit commands will allow us to avoid the JS exception dance altogether and will make a much simpler jstest.

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