ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0, 9.1.0-rc1025
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • Fully Compatible
    • ALL
    • ClusterScalability 26Oct-9Nov
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In chunkMigration, there is a document for the donor and recipient in config.rangeDeletions. As documents are copied to the recipient, the recipient document increments its numOrphanDocs . For example, 2 documents are copied and the recipient document has a numOrphanDocs count of 2 (the purpose of the recipient document is to delete these orphans on abort), BUT pending: true is set, which means it's not finalized yet.

      So then what's happening is analyzeShardKey queries for all config.rangeDeletions  documents on the recipient and it gets 2, even though the doc is still pending: true.

      The reason that config.rangeDeletions is still visible even after moveRange successfully completed is that the majority WC was acknowledged by the secondary, but it hadn't been applied yet. Then analyzeShardKey read the stale document for its numOrphanDocs count.
       
      Since numOrphanDocs is an estimate and eventual consistency is acceptable for that statistic, a valid fix is to just ensure the secondary has caught up in applying before running analyzeShardKey.

            Assignee:
            Jordan Glassley
            Reporter:
            Jordan Glassley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: