Some DataBearingNodes metrics are not propogated for $unionWith and $lookup getMores

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • ALL
    • Hide

      Run attached test in noPassthrough with bytesRead as an example. Test doesn't fail since we assert for the wrong behavior.

      Show
      Run attached test in noPassthrough with bytesRead as an example. Test doesn't fail since we assert for the wrong behavior.
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When mongod is acting as a router in $unionWith or $lookup, we may not always record accurate data bearing node metrics on mongod/mongos if the $unionWith has to execute a getMore. Some metrics like docsExamined are accumulated through plan_summary_stats, but other metrics (bytesRead, cpuNanos, etc.) are not updated there.

      It looks like we get the first batch metrics because we do aggregate the metrics directly from the first response off the cursorResponse. The lack of propagation occurs for getMores where the AsyncResultsMerger collects the cursorMetrics, but the unionWithStage only accumulatesPlanSummaryStats and drops the rest of the cursor metrics. Something similar is probably happening for $lookup as well. 

            Assignee:
            Unassigned
            Reporter:
            Erin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: