[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: |
|
||||||||||||||||||||
| 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: This patch ensures collections have UUIDs when |