Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
2.5.4
-
None
-
ALL
Description
On the latest 2.5.x nightly, 92cf0713b74ce2f8b011e6768a66c4e99d75a8ea, failed index builds appear to be NOOPS:
> db.foo.ensureIndex({a:'woohoo'});
|
> db.getLastErrorObj()
|
{
|
"connectionId" : 15,
|
"n" : 0,
|
"syncMillis" : 0,
|
"writtenTo" : null,
|
"err" : null,
|
"err" : null,
|
"ok" : 1
|
}
|
Note that the nightly above is prior to the new createIndexes command for SERVER-1627.
On 2.4.9, failed index builds yield an error:
> db.foo.ensureIndex({a:"ok"})
|
{
|
"err" : "Unknown index plugin 'ok' in index { a: \"ok\" }",
|
"code" : 16734,
|
"n" : 0,
|
"connectionId" : 1,
|
"ok" : 1
|
}
|
> db.foo.ensureIndex({a:[1,2]})
|
{
|
"err" : "bad index key pattern { a: [ 1.0, 2.0 ] }",
|
"code" : 10098,
|
"n" : 0,
|
"connectionId" : 1,
|
"ok" : 1
|
}
|
> db.foo.ensureIndex({a:{"ORLY":"YARLY"}})
|
{
|
"err" : "bad index key pattern { a: { ORLY: \"YARLY\" } }",
|
"code" : 10098,
|
"n" : 0,
|
"connectionId" : 1,
|
"ok" : 1
|
}
|
>
|
Attachments
Issue Links
- is duplicated by
-
SERVER-12215 createIndex and ensureIndex do not report error with write commands
-
- Closed
-
- is related to
-
SERVER-12538 Possible to create indexes with invalid orderings
-
- Closed
-