In Sorter only log merging spills if we actually do it

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Storage Execution
    • Storage Execution 2025-10-27
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently we always log when we enter _mergeSpills function: https://github.com/mongodb/mongo/blob/deff7f6bf8ed2341856468d20285e03db1460134/src/mongo/db/sorter/sorter_template_defs.h#L695

      And in some places we call this function without checking if it is needed, because it is idempotent.

      We should only log this if we actually have some work to do because merging spills is expected happen in very rare cases of a realy big sorts (like a new index build of a huge collection).

            Assignee:
            Cedric Sirianni
            Reporter:
            Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: