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

Implement a barrier for disallowing direct writes to shards



    • Task
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • Sharding
    • None
    • Sharding EMEA


      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".


        Issue Links



              backlog-server-sharding-emea Backlog - Sharding EMEA
              kaloian.manassiev@mongodb.com Kaloian Manassiev
              0 Vote for this issue
              13 Start watching this issue