[SERVER-263] Could db commands take k/v pairs in any order? Created: 26/Aug/09  Updated: 10/Sep/09  Resolved: 26/Aug/09

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

Type: Question Priority: Minor - P4
Reporter: Kristina Chodorow (Inactive) Assignee: Eliot Horowitz (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

> db.$cmd.findOne(

{deleteIndexes: "y", index: "bar_1_baz_1_foo_1"}

)

{"nIndexesWas" : 4 , "ok" : 1}

> db.$cmd.findOne(

{index: "bar_1_baz_1_foo_1", deleteIndexes: "y"}

)

{"errmsg" : "no such cmd" , "ok" : 0}

This kind of sucks for Perl, as it hashes those particular k/v's with "index" first. If people try something like:

$db->run_command(

{ whatever => ...}

)

it might not work and be confusing as to why.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 10/Sep/09 ]

closed b/c resolved more than 2 week ago

Comment by Eliot Horowitz (Inactive) [ 26/Aug/09 ]

no. bson is ordered, and we want the commands to be fast, so need the command name to be first anyway.

Generated at Thu Feb 08 02:53:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.