[SERVER-67325] Collection creation must be disallowed for collections undergoing a rename Created: 16/Jun/22  Updated: 29/Oct/23  Resolved: 27/Jun/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 5.0.10, 5.3.3, 6.0.0-rc11, 6.1.0-rc0
Fix Version/s: 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Silvia Surroca
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes SERVER-73385 RenameCollectionCoordinator wrongly r... Closed
Related
is related to SERVER-67845 Acquire critical section in rename "c... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2022-06-27, Sharding EMEA 2022-07-11
Participants:

 Description   

The RenameCollectionCoordinator does the following:

  1. Disallow all other DDL operations (excluding create) for the same db
  2. Check that the options are valid (e.g. make sure that the target collection does not exist if dropTarget = true).
    1. If checks are passing, the coordinator is not flagged as "complete on error".
  3. Rename participant commandss are invoked on each shard, the critical section is acquired for both collections.

This flow is faulty because if an explicit/implicit create sneaks in between bullets 2 and 3, this causes the rename participant that is executing on the shard primary to hang indefinitely.



 Comments   
Comment by Githook User [ 27/Jun/22 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-67325 Collection creation must be disallowed for collections undergoing a rename
Branch: master
https://github.com/mongodb/mongo/commit/08f1e1401f2d527d98f7c5c6f384e28f63a75989

Generated at Thu Feb 08 06:07:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.