[SERVER-53468] Ensure config.chunks stability during upgrade/downgrade Created: 21/Dec/20  Updated: 29/Oct/23  Resolved: 09/Jan/21

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: Sergi Mateo Bellido
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:
Problem/Incident
causes SERVER-71399 Jumbo chunk flag isn't automatically ... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

The functions that upgrade/downgrade the metadata format of config.chunks entries should be executed either before or after a chunk operation. Otherwise, we could end up in the following situation:

  • Chunk operation starts
  • Chunk operation get chunk document(s) to operate with
  • Upgrade/downgrade starts
  • Upgrade/downgrade finishes
  • Chunk operation commits

A possibility could be holding the ChunkOpLock while upgrading/downgrading config.chunks metadata.
Also, for chunk operations, the current chunk document should be get/modified under the same lock before committing (without relying on ChunkType arguments arriving from non-lock-guarded sections as it happens for example here).



 Comments   
Comment by Ian Whalen (Inactive) [ 09/Jan/21 ]

Author:

{'username': u'evrg-bot-webhook', 'name': u'Sergi Mateo Bellido', 'email': u'sergi.mateo-bellido@mongodb.com'}

Message:SERVER-53468 Ensure config.chunks stability during upgrade/downgrade

  • Get the chunks lock when upgrading/downgrading this collection during
    the execution of the setFCV command.
  • The new chunks generated by Move/split/merge operations rely on the
    schema of an existing document in config.chunks to know if we should use
    UUID or NS.
Comment by Sergi Mateo Bellido [ 09/Jan/21 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-53468 Ensure config.chunks stability during upgrade/downgrade

  • Get the chunks lock when upgrading/downgrading this collection during the execution of the setFCV command.
  • The new chunks generated by Move/split/merge operations rely on the schema of an existing document in config.chunks to know if we should use UUID or NS.
  • Avoiding unnecessary copies

Branch: master
https://github.com/mongodb/mongo/commit/2a17e747a645ab805c8977d287716c958dc7d3cf

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