[SERVER-29370] add schema upgrade/downgrade phase to mongod setFeatureCompatibilityVersion command Created: 25/May/17  Updated: 30/Oct/23  Resolved: 25/Jul/17

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 3.5.11

Type: Task Priority: Major - P3
Reporter: Geert Bosch Assignee: Maria van Keulen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-29569 Store the featureCompatibilityVersion... Closed
Duplicate
is duplicated by SERVER-27993 Implement schema upgrade/downgrade fo... Closed
is duplicated by SERVER-27994 Implement full upgrade/downgrade FCV ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Storage 2017-06-19, Storage 2017-07-10, Storage 2017-07-31
Participants:

 Description   

This involves adding a schemaVersion read-only global parameter (see FeatureCompatibility in server_options.h ).

In setFeatureCompatiblityCommand, for the upgrade case, first upgrade the schemaVersion and then iterate over all collections in the catalog, and perform an empty collMod command on each. In turn collMod should call a new CollectionCatalogEntry::updateUUID() method, which assigns a new UUID if there is none and the schema is 3.6, or removes it if there is one and the schema is 3.4. In both cases persist the new UUID, and on commit update the copy in the catalog using a new Collection::updateUUID() method.

In userCreateNSImpl, the schemaVersion should be used (in addition to the temporary enableCollectionUUIDs parameter) to determine whether to assign UUIDs or not.



 Comments   
Comment by Githook User [ 25/Jul/17 ]

Author:

{'email': 'maria@mongodb.com', 'username': 'mvankeulen94', 'name': 'Maria van Keulen'}

Message: SERVER-29370 Update UUIDs when featureCompatibilityVersion is changed

This patch ensures collections have UUIDs when
featureCompatibilityVersion is 3.6 and collections do not have UUIDs
when featureCompatibilityVersion is 3.4 (or below).
Branch: master
https://github.com/mongodb/mongo/commit/b2ef59c4fa30c2e242840cc1aa55de3c8cdfa887

Generated at Thu Feb 08 04:20:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.