Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9522

Docs for SERVER-22234: Collection with a long key fails validation

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: manual, Server

      Description

      Engineering Ticket Description:

      If a long index key (greater than 1024) is inserted into a collection (when the parameter failIndexKeyTooLong is set to false), then collection validate does not take it into account and fails. This seems to have been introduced from the work in SERVER-19521.

      {
      	"ns" : "test.longindex",
      	"nrecords" : 2,
      	"nIndexes" : 1,
      	"keysPerIndex" : {
      		"test.longindex.$_id_" : 1
      	},
      	"indexDetails" : {
      		"test.longindex.$_id_" : {
      			"valid" : true
      		}
      	},
      	"valid" : false,
      	"errors" : [
      		"number of _id index entries (1) does not match the number of documents (2)"
      	],
      	"advice" : "ns corrupt. See http://dochub.mongodb.org/core/data-recovery",
      	"ok" : 1
      }
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kay.kim Kay Kim
                Reporter:
                emily.hall Emily Hall
                Participants:
                Last commenter:
                Kay Kim
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Days since reply:
                  3 years, 1 week, 3 days ago