[SERVER-12244] can't run reIndex() on collection if it contains an index key with an empty field Created: 02/Jan/14  Updated: 02/Apr/14  Resolved: 11/Feb/14

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: None
Fix Version/s: 2.6.0-rc0

Type: Bug Priority: Major - P3
Reporter: Michael O'Brien Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-12242 can't run "compact" on a collection i... Closed
is related to SERVER-12070 Validate all indexes for new restrict... Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Participants:

 Description   

similar to SERVER-12242

  • in 2.4 create an index like {"a..b":1}
  • upgrade node to 2.6
  • try to run db.coll.reIndex()

 m27000| 2014-01-02T17:53:43.632-0500 [conn1] CMD: reIndex test.test
 m27000| 2014-01-02T17:53:43.633-0500 [conn1] build index on: test.test properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "test.test" }
 m27000| 2014-01-02T17:53:43.634-0500 [conn1] build index done.  scanned 100 total records. 0 secs
{
        "nIndexesWas" : 3,
        "ok" : 0,
        "errmsg" : "Index key cannot contain an empty field.",
        "code" : 67
}



 Comments   
Comment by Githook User [ 02/Apr/14 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-12242 SERVER-12244 Fix typo in compact/reIndex error messages

The error messages originally were incorrectly swapped with one
another.

(cherry picked from commit df0236cab083063fd125e289c6bac6b017bc6b67)
Branch: v2.6
https://github.com/mongodb/mongo/commit/65b84b79e5bb514e658065d5d9028b85061deae6

Comment by Githook User [ 02/Apr/14 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-12242 SERVER-12244 Fix typo in compact/reIndex error messages

The error messages originally were incorrectly swapped with one
another.
Branch: master
https://github.com/mongodb/mongo/commit/df0236cab083063fd125e289c6bac6b017bc6b67

Comment by Githook User [ 11/Feb/14 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-12070 SERVER-12242 SERVER-12244 Validate existing indexes
Branch: master
https://github.com/mongodb/mongo/commit/b5f67b6a6aec989aec7c01fd445b25c5804f9016

Comment by Githook User [ 11/Feb/14 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: Move index key validation into IndexCatalog::validateKeyPattern

This just moves around existing checks and tries to harmonize the error
messages. Should not change behavior other than error text.

Prep for SERVER-12070 SERVER-12242 SERVER-12244. They will all use this
function to do their validation.
Branch: master
https://github.com/mongodb/mongo/commit/320ccdad6bd6975a3d7480e1bf8374353c545ec6

Comment by Daniel Pasette (Inactive) [ 16/Jan/14 ]

We should do a validation step before compact which will use the same method used in checking for valid indexes used in SERVER-12070.

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