[SERVER-52767] Handle collectionUUID in config.chunks on upgrade/downgrade Created: 11/Nov/20  Updated: 29/Oct/23  Resolved: 10/Dec/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Task Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Jordi Serra Torrens
Resolution: Fixed Votes: 0
Labels: PM-1965-Milestone-0-Metadata-Format
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-52762 Always persist ChunkType with the pro... Closed
is depended on by SERVER-53105 Remove namespace field from config.ch... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

Patch up config.chunks entries in the following ways:

  • Remove the collectionUUID field during downgrade
  • Add the collectionUUID field during upgrade

Current config server config.chunks collection format (before upgrade / after downgrade):

{
      _id : "test.foo-a_MinKey",
      ns : "test.foo",
      min : {
              "a" : { "$minKey" : 1 }
      },
      max : {
              "a" : { "$maxKey" : 1 }
      },
      shard : "test-rs1",
      lastmod : Timestamp(1, 0),
      lastmodEpoch : ObjectId("587fc60cef168288439ad6ed"),
      jumbo : false              // optional field
   }

New config server config.chunks collection format (before downgrade / after upgrade):

{
      _id : "test.foo-a_MinKey",
      uuid : "9ecb0808-b62b-4204-9f99-8c65c9e6e10b",
      min : {
              "a" : { "$minKey" : 1 }
      },
      max : {
              "a" : { "$maxKey" : 1 }
      },
      shard : "test-rs1",
      lastmod : Timestamp(1, 0),
      lastmodEpoch : ObjectId("587fc60cef168288439ad6ed"),
      jumbo : false              // optional field
   }



 Comments   
Comment by Githook User [ 10/Dec/20 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-52767: Handle collectionUUID in config.chunks on upgrade/downgrade
Branch: master
https://github.com/mongodb/mongo/commit/ba633521a7c2815527be955b11a772395f153cd3

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