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

Avoid pre-loading entire chunks list in memory during CheckMetadataConsistency

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0, v7.0
    • CAR Team 2025-02-17, CAR Team 2025-03-03
    • 2

      During the execution of CheckMetadataConsistency we currently load the entire chunk list for a specific collection in memory in order to check them for consistency.

      For collections with millions of chunks, this means that CheckMetadataConsistency would possibly need GBs of memory to load all the chunks in memory.

      Instead of loading all chunks at once in memory, we can use a cursor and fetch small batch each time. Like we do for mergeAllChunksOnShard.

            Assignee:
            silvia.surroca@mongodb.com Silvia Surroca
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: