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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.0.2, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v5.0
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Nicholas Zolnierz
            Reporter:
            Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: