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

Introduce new type for clusteredIndex create command with key: _id

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • Execution Team 2021-09-20, Execution Team 2021-10-04

      The clusteredIndex option for create should eventually take the following for — for now, key is limited to {_id: 1}

      {
        create: <collection name>,
        clusteredIndex: { 
          	// <key pattern>
           	// (a) uses existing index key specification structure -
           	//  	all fields must be ascending (1), descending (-1) or "hashed"
        	// (b) multi-key cluster keys are prohibited
              key: <key pattern>, // required
              unique: <bool>, // required, must be ‘true        name: <string>, // optional, otherwise automatically generated
              v: <int>, // optional, must be ‘2’ if provided
        },	
         // expireAfterSeconds only available when <cluster key> is a single field.   expireAfterSeconds: <String or NumberLong> // optional
      }
      

      Included in this task:

      • create a ClusteredCollectionOptions idl struct
      • modify create.idl's clusteredIndex option to take in either a boolean or ClusteredCollectionOptions
      • modify CollectionOptions and CollectionImpl to distinguish between collections that use the new and old format

            Assignee:
            haley.connelly@mongodb.com Haley Connelly
            Reporter:
            haley.connelly@mongodb.com Haley Connelly
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: