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

createIndexes can return error without an error code

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.6.0-rc1
    • Index Maintenance
    • Storage Execution
    • ALL
    • Hide

      > db.runCommand({createIndexes: 'collection', indexes: {key: {a: 1}, name: 'a_1'}})
      {
      	"cmdObj" : {
      		"createIndexes" : "collection",
      		"indexes" : {
      			"key" : {
      				"a" : 1
      			},
      			"name" : "a_1"
      		}
      	},
      	"ok" : 0,
      	"errmsg" : "indexes has to be an array"
      }

      Show
      > db.runCommand({createIndexes: 'collection', indexes: {key: {a: 1}, name: 'a_1'}}) { "cmdObj" : { "createIndexes" : "collection", "indexes" : { "key" : { "a" : 1 }, "name" : "a_1" } }, "ok" : 0, "errmsg" : "indexes has to be an array" }

    Description

      This is particularly bad for drivers, since we assume that if a command fails with no code, it is because we are talking to an old server and the command does not exist, and we fall back to inserting into system.indexes.

      Attachments

        Activity

          People

            backlog-server-execution Backlog - Storage Execution Team
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: