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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.0-rc7
    • None
    • None
    • None
    • Sharding NYC
    • Fully Compatible
    • ALL
    • v7.0
    • Sharding NYC 2023-07-10
    • 135

    Description

      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)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: