Allow sharded $changeStream to continue if collection is dropped and resharded before documentKey is obtained

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.7.4
    • Affects Version/s: 3.6.0-rc2
    • Component/s: Aggregation Framework
    • None
    • Fully Compatible
    • Query 2018-05-07
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      At present, we uassert if the current UUID of the sharded namespace on which the $changeStream is running differs from the UUID found in the oplog entry, implying that the collection was dropped and resharded before we had a chance to obtain the shard key fields for the documentKey. This prevents $changeStream from returning the remaining oplog entries leading up to the original collection's invalidation.

      However, given that:

      ... it should be safe to simply return _id for the documentKey and allow $changeStream to proceed. This would bring sharded $changeStream into alignment with the behaviour on a single replica set, where dropping and recreating a collection in this way does not prevent $changeStream from retrieving the remainder of the old collection's oplog entries.

            Assignee:
            Nicholas Zolnierz
            Reporter:
            Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: