Fix tests calling enableSharding after implicitly creating a database

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • Sharding EMEA 2023-10-02
    • 160
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Pierlauro Sciarelli
              Reporter:
              Pierlauro Sciarelli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: