[SERVER-69398] Check filler_collection already exists in explain_missing_collection.js Created: 02/Sep/22  Updated: 29/Oct/23  Resolved: 07/Sep/22

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

Type: Task Priority: Major - P3
Reporter: Enrico Golfieri Assignee: Enrico Golfieri
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-68152 explain_missing_collection.js fails w... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v6.1
Sprint: Sharding EMEA 2022-09-05, Sharding EMEA 2022-09-19
Participants:
Linked BF Score: 32

 Description   

Currently a filler collection is created in order to create the db in case it doesn't already exist https://github.com/10gen/mongo/blob/97cdfef9e4f74918176f1916bc53ada8f9f66868/jstests/core/explain_missing_collection.js#L8. However, explain_missing_collection might run twice on the same cluster, causing createCollection to fail. A check to prevent that should be implemented 



 Comments   
Comment by Githook User [ 08/Sep/22 ]

Author:

{'name': 'Enrico Golfieri', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}

Message: SERVER-69398 filler_collection should be dropped in explain_missing_collection.js
Branch: v6.1
https://github.com/mongodb/mongo/commit/ca0b75fbe224779a843620a5d4e7b079e57d7898

Comment by Githook User [ 06/Sep/22 ]

Author:

{'name': 'Enrico Golfieri', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}

Message: SERVER-69398 filler_collection should be dropped in explain_missing_collection.js
Branch: master
https://github.com/mongodb/mongo/commit/5f0cb614d5db7d218d926813051cb9425b1c6dac

Comment by Max Hirschhorn [ 02/Sep/22 ]

The pattern for tests in the jstests/core/ directory is to call drop on any namespace being used at the very beginning of the test file via DBCollection.prototype.drop() which ignores if the namespace doesn't exist.

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