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

Shard op observer shouldn't mark collection as unsharded on secondaries

    • Fully Compatible
    • ALL
    • Hide

      1. Create a sharded cluster with at least two nodes
      2. Shard a collection and make the persistence of the chunk metadata update to fail
      3. Step down the primary
      4. Check the shard version of the collection on the new primary, it should be unknown

      Show
      1. Create a sharded cluster with at least two nodes 2. Shard a collection and make the persistence of the chunk metadata update to fail 3. Step down the primary 4. Check the shard version of the collection on the new primary, it should be unknown
    • Sharding 2020-08-10
    • 13

      SERVER-47809 added extra code that inteded to set the shard version as unsharded on implicit operations, however, it is also setting secondaries shard version as Unsharded, and, if the persistence of the chunk metadata update fails (like for example because of a step down), then secondaries might end with an Unsharded shard version when it should be Unknown.

      Additionally if the shard collection fails to refresh, we should make sure the collection metadata is set to Unknown, to prevent having a wrong shard version even though the write succeeded on the config server.

            Assignee:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Reporter:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: