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

Inefficient usage of memory tracking map for $group and $setWindowFields

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.2, 5.1.0-rc0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v5.0
    • Linked BF Score:
      0

      Description

      As part of SERVER-54664, the memory tracking for $group was refactored to get some code sharing with window functions. The new tracker uses a pattern such as this, which is inefficient since in the worst case it will need to access the map twice. Instead, we should use the returned result of try_emplace when updating the memory usage.

        Attachments

          Activity

            People

            Assignee:
            nicholas.zolnierz Nicholas Zolnierz
            Reporter:
            nicholas.zolnierz Nicholas Zolnierz
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: