Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12540

GLE doesn't set error for failed index builds

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.5.4
    • Component/s: Index Maintenance
    • None
    • ALL

      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
      }
      >
      

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: