Check no orphaned document is present on a recipient shard before starting cloning a range

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0, 8.2.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • Fully Compatible
    • v8.2, v8.0
    • ClusterScalability Sep29-Oct13
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Due to historical reason (e.g. inserts via direct connection) or unforeseen range deleter bugs, it may happen for documents to exist on a shard not owning the range they fall into.

      In order to prevent mixing up legit documents (incoming via a migration) and spurious ones (incorrectly present within the range being moved), we could add a check at the beginning of cloning and fail the migration if documents are already present. This would be as cheap as opening a cursor on the shard key index at the beginning of the range and checking the shard key of the first returned document.

            Assignee:
            Adi Zaimi
            Reporter:
            Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: