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

Memory used by sorter spills can grow without bound

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Execution
    • ALL
    • QE 2024-04-29, QE 2024-05-13

      A sorter maintains a vector of "iterators" for each range of data that it spills to disk. Each allocation of this FileIterator is 128 bytes, plus the shared_ptr's control block. Thus with enough spills, the amount of memory being used can easily exceed the value configured by maxIndexBuildMemoryUsageMegabytes. This can also be exacerbated by building multiple indexes in a single index build, since the memory limit will be shared among the indexes and thus each one will spill more often.

            Assignee:
            foteini.alvanaki@mongodb.com Foteini Alvanaki
            Reporter:
            gregory.noma@mongodb.com Gregory Noma
            Votes:
            0 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated: