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

Provide "id" of collection

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.5.5
    • Storage
    • None
    • Fully Compatible
    • Storage 2017-03-27

    Description

      It would be very helpful for clients, like replication or sharding, to track collection via a unique id which doesn't change during a rename or restarts. The "id" should be the same across replicas in a set or shards in a sharded cluster. Note: There is already an _id in sharding metadata for a collection but that is not exposed.

      Here is an example of output from listCollections with an "id":

      > db.runCommand("listCollections")
      {
      	"collections" : [
      		{
      			"id" : NumberLong("70368744177664"),
      			"name" : "system.indexes",
      			"options" : {}
      		}
      	],
      	"ok" : 1
      }
      

      Attachments

        Issue Links

          Activity

            People

              geert.bosch@mongodb.com Geert Bosch
              scotthernandez Scott Hernandez
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: