Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-54948

Calling `shardCollection` after `enableSharding` from a different MongoS is not causally consistent

    • Fully Compatible
    • ALL
    • v5.0
    • Sharding EMEA 2021-07-26

      The enableSharding operation just enables the sharded:true bit on the entry for a specific database, but doesn't bump the database version, nor involves the database primary. This means that calling enableSharding from one MongoS and then performing shardCollection through another may cause the DB Primary executing the shardCollection procedure to not see the field enabled and fail the operation.

      This used to work when shardCollection executed on the config server, because it was always the primary, but now that it runs on the DB Primary, this is no longer guaranteed.

            Assignee:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: