[Join Optimization] Implement memory tracking and reduce memory footprint of $joinPlanCacheStats

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The $joinPlanCacheStats stage currently iterates over the entire cache and serializes every entry to BSON before returning vector<BSONObj> over the MongoProcessInterface. For the EAP, this is ok as the size of the cache is controlled by a query knob so the memory used by this stage is capped. For GA, we need to implement some hardening to ensure that this stage does not use a large amount of memory without removing its diagnostic value.

            Assignee:
            Unassigned
            Reporter:
            Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: