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

Update config.[chunks|collections|databases] entry examples

      Description

      Starting from v5.0, the ns field of config.chunks is replaced by the uuid field, while the lastmodEpoch field has been thrown out. Hence, the current example should be updated.

      Replace "ns" : "mydb.foo", with "uuid": "c025d039-e626-435e-b2d2-c1d436038041", and remove "lastmodEpoch" : ObjectId("5d8aa9fbe7a2f52c300e8e6f"), .

      EDIT: also config databases and config.collections have changed, you may repurpose the existing entries with the fields present in the two following examples. They do not contain all optional fields, but that should be fine since customers should not touch internal collections.

      Example of new config.collections entry:

      {
              "_id" : "nameOfTheDatabase.nameOfTheCollection",
              "lastmodEpoch" : ObjectId("60f989a2430bfdd95d8cfa20"),
              "lastmod" : ISODate("2021-07-22T15:07:14.301Z"),
              "timestamp" : Timestamp(1626966434, 13),
              "uuid" : UUID("c88e9237-ae8b-452e-9d89-bcdcaaa763db"),
              "key" : {
                      "num" : 1
              },
              "unique" : false,
              "noBalance" : false
      }
      

      Example of new config.databases entry:

      {
        "_id" : "nameOfTheDatabase",
        "primary" : "shard3-rs1",
        "partitioned" : true,
        "version" : {
        "uuid" : UUID("b0f9c370-536b-4028-bf7e-2b5dad36395a"),
        "timestamp" : Timestamp(1626966433, 34),
        "lastMod" : 1
      }
      

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

            Assignee:
            alison.huh@mongodb.com Alison Huh
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              2 years, 39 weeks, 6 days ago