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

Remove check in the analyzeShardKey command that expects number of orphaned documents <= total number of documents

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.0-rc7
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Sharding NYC
    • Fully Compatible
    • ALL
    • v7.0
    • Sharding NYC 2023-07-10
    • 135

      This assertion checks that the number of orphaned documents for a collection is always at most equal to the total number of documents in the collection itself.

      The assertion must be removed because it is transiently allowed for the tracked number of orphaned docs to be greater than the number of documents actually contained in the collection. The reason behind that is that the number of orphaned documents is not decremented during a range deletion but only when it finishes.

      Example:

      1. Collection has 1K documents in total, all belonging to a single chunk being migrated off (numOrphans = 0, numDocs=1K)
      2. Migration ends (numOrphans = 1K, numDocs=1K)
      3. Range deletion starts (numOrphans = 1K, numDocs=1K)
      4. Range deletion is ongoing, half orphans were deleted (numOrphans = 1K, numDocs=500)
      5. Range deletion ends (numOrphans = 0, numDocs=0)

            Assignee:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: