[SERVER-70653] CreateCollectionCoordinator should check if a request has been already served without acquiring the CriticalSection over the collection (for both current and legacy request versions). Created: 18/Oct/22  Updated: 29/Oct/23  Resolved: 24/Oct/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Paolo Polato Assignee: Paolo Polato
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2022-10-31
Participants:
Linked BF Score: 127

 Description   

It has been observed a failure on autosplit_setFCV_downgrade_from_60.js.

Looking at the logs, the following sequence may have triggered this invariant:

  1. j0:s0:prim succesfully completes the shardCollection() of test10_fsmdb0.autosplit_setFCV_downgrade_from_60_1
  2. j0:s0:prim gets downgraded to 6.0 (from now on, any new shardCollection() request will be served applying the V2 of the DDL coordinator.
  3. j0:s0:prim starts donating a chunk of test10_fsmdb0.autosplit_setFCV_downgrade_from_60_1 and acquires the critical section for the collection
  4. j0:s0:prim receives a second shardCollection() request for test10_fsmdb0.autosplit_setFCV_downgrade_from_60_1, which should be treated as a no-op;
    • being run as a V2 DDL, it needs to acquire the critical section before verifying that the command is equivalent to what has been performed on step 1
    • nevertheless, such acquisition is illegal due to step 3 - and leads to the invariant


 Comments   
Comment by Githook User [ 24/Oct/22 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-70653 Call checkIfCollectionIsAlreadySharded without acquiring the collection CriticalSection
Branch: master
https://github.com/mongodb/mongo/commit/0b55b04b6565de04d3c6fee3267f1a2812170633

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