[SERVER-81559] Fix tests calling enableSharding after implicitly creating a database Created: 29/Sep/23  Updated: 29/Oct/23  Resolved: 29/Sep/23

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

Type: Bug Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: car-71-backport-declined
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 2023-10-02
Participants:
Linked BF Score: 160

 Description   

SERVER-81293 committed some changes to jstests that have turned out wrong because enableSharding is called with the primaryShard option right after creating a collection, that implicitly creates a database potentially on a shard different than the desired one.

We have observed some sporadic failures only in multiversion suites with mixed binaries (random binaries versions for each shard). When implicitly creating a database, the least loaded shard is chosen and most probably the issue is due to the fact that shards in older versions create less internal collections.



 Comments   
Comment by Githook User [ 29/Sep/23 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-81559 Fix tests calling enableSharding after implicitly creating a database
Branch: master
https://github.com/mongodb/mongo/commit/d965659e52f1328c3bddf4f3e8898fe4b5a10f1f

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