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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.7.0
    • Component/s: Sharding
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      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
    • Sprint:
      Sharding 2020-08-10
    • Linked BF Score:
      13

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: