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

$changeStream can fail if a shard was removed

    • Query Execution
    • ALL
    • Query 2018-02-12, Query 2018-02-26
    • 0

      because mongos currently does not allow remote queries on shards that were removed. It is also unclear from the user point of view when is it safe to physically take out the shard that was removed and not make the change stream lose track of some of the writes.

      Possible fix is to make it such that removeShard and changeStream work together:

      • removeShard will insert an 'end of life' sentinel oplog entry
      • changeStream sees the sentinel and kills itself
      • removeShard will not return success until there are no more change stream cursors in the shard

      In this scheme, the user will know that it is safe to completely decommission the shard once removeShard completes.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: