[SERVER-80246] Fsync test is not correctly checking for concurrent ddl operations Created: 18/Aug/23  Updated: 29/Oct/23  Resolved: 23/Aug/23

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 7.0.2, 6.0.11

Type: Bug Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Marcos José Grillo Ramirez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-76486 Make RefineShardKey coordinator autho... Closed
Problem/Incident
is caused by SERVER-78154 Detect on-going DDL operations in fsy... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.0
Sprint: Sharding EMEA 2023-09-04
Participants:
Linked BF Score: 154

 Description   

SERVER-78154 added code in the fsync command to detect and fail in the presence of concurrent DDL operations. The way it is currently working is by querying the config.system.sharding_ddl_coordinators collection and checking for documents present there, however, the test is not sharding the collection that will be refined, and considering SERVER-76486 will change refine collection shard key flow, the following scenario becomes possible:

1. A refineCollectionShardKey command is sent The service is created, but because of SERVER-76486 the check of the collection (it must be sharded in order to continue) is done before the first store in disk.
2. The refineCollectionShardKey fails but then stops in the failpoint
3. The fsync command runs, checks for the coordinator document, but doesn't find anything because the DDL haven't registered the coordinator document yet

This scenario goes against the initial intention of the test, so we should shard the collection at the beginning of the test.



 Comments   
Comment by Githook User [ 30/Aug/23 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-80246 Shard collection before calling DDL in fsync lock test

(cherry picked from commit 7236df27b8cdc9beea685cfd8044f54f3a7c5285)
Branch: v7.0
https://github.com/mongodb/mongo/commit/caa231dee7c7a86a86024b2db407a5e330d676f1

Comment by Githook User [ 22/Aug/23 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-80246 Shard collection before calling DDL in fsync lock test
Branch: master
https://github.com/mongodb/mongo/commit/7236df27b8cdc9beea685cfd8044f54f3a7c5285

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