[SERVER-19806] Query on $cmd.sys.inprog requires limit -1 on mongos Created: 06/Aug/15  Updated: 07/Oct/15  Resolved: 18/Sep/15

Status: Closed
Project: Core Server
Component/s: Admin, Diagnostics
Affects Version/s: None
Fix Version/s: 3.1.9

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: Adam Midvidy
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-19810 mongos requires queries on $cmd.sys.i... Closed
is related to SERVER-7775 Make special commands (inprog, killop... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platform 8 08/28/15, Platform 9 (09/18/15)
Participants:

 Description   

Reproduced with git version 0549805e. Sometime recently mongos began requiring a limit of -1 when querying $cmd.sys.inprog:

mongos> db.$cmd.sys.inprog.find()
Error: error: {
	"$err" : "bad numberToReturn (0) for $cmd type ns - can only be 1 or -1",
	"code" : 16978
}

This is a backwards-compatibility break. mongod of the same version continues to allow any limit, as before.



 Comments   
Comment by Githook User [ 18/Sep/15 ]

Author:

{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}

Message: SERVER-19806 validate nToSkip and nToReturn when upconverting pseudocommands in MongoD
Branch: master
https://github.com/mongodb/mongo/commit/0f407e6b9b971e36535534ffedc5c7314865606f

Comment by J Rassi [ 06/Aug/15 ]

Unless an existing driver helper depends on the old behavior, I'd recommend that we resolve this inconsistency by adding the same restriction to $cmd.sys.inprog queries on mongod.

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