[SERVER-2780] reIndex command returns "ok" element twice in result Created: 17/Mar/11  Updated: 12/Jul/16  Resolved: 17/Mar/11

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 1.8.0
Fix Version/s: 1.9.0

Type: Bug Priority: Minor - P4
Reporter: Robert Stam Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 64-bit.


Operating System: ALL
Participants:

 Description   

When the reIndex command is run the result document has two "ok" elements. Here's the output when run from the mongo shell:

> db.test.reIndex()
{
"nIndexesWas" : 2,
"msg" : "indexes dropped for collection",
"ok" : 1,
"nIndexes" : 2,
"indexes" : [
{
"name" : "id",
"ns" : "test.test",
"key" :

{ "_id" : 1 }

,
"v" : 0
},
{
"_id" : ObjectId("4d82279930d845dde2ea8fd1"),
"ns" : "test.test",
"key" :

{ "x" : 1 }

,
"name" : "x_1",
"v" : 0
}
],
"ok" : 1
}
>



 Comments   
Comment by auto [ 17/Mar/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: don't add ok twice to reIndex result SERVER-2780
https://github.com/mongodb/mongo/commit/5417d9fdbb4187f5a8c4facae9d2ea22c4dae6b2

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