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

Implement a barrier for disallowing direct writes to shards

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Sharding EMEA
    • Sharding EMEA 2023-05-01

      Due to the current architecture of sharding, all write operations in a sharded cluster rely on the shard versioning protocol as a way to ensure that writes are going to the shard where they are supposed to be. This also has a nice side benefit that we don't have to incur performance penalty for checking whether the shard owns the write.

      Because of the above, direct writes to a shard have the potential of corrupting data, because they don't observe the shard versioning protocol, so we should disallow them.

      However, in order to allow customers to transition from a replica set to a sharded cluster without incurring downtime for their applications, there must be a window of time when direct writes to the shard are permitted.

      This ticket is to implement some form of barrier after which we disallow direct writes to any shard in a sharded cluster.

      The barrier doesn't need to be very granular and it should be acceptable such a barrier to be "the first time someone calls shardCollection or addShard".

            Assignee:
            backlog-server-sharding-emea [DO NOT USE] Backlog - Sharding EMEA
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: