-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Query Integration
-
Fully Compatible
The call to LiteParsedPipeline::tickGlobalStageCounters() depends on the status from running the pipeline being Status::OK(). This means the aggStageCounters won't be incremented if the aggregation pipeline errors. Not incrementing the aggStageCounters in mongos has made it challenging to identify from which mongos an aggregation a problematic aggregation (SERVER-82410) is being run in hopes to identify the particular application client triggering it (although we suspect Compass). Additionally, it is odd for mongos and mongod to have different behaviors when it comes to system observability.
There may be downsides to having mongos increment its aggStageCounters even when the aggregation pipeline errors and so it is worth the Query team discussing internally to come to a decision again.
if (status.isOK()) { updateHostsTargetedMetrics(opCtx, namespaces.executionNss, cri ? boost::make_optional(cri->cm) : boost::none, involvedNamespaces); // Report usage statistics for each stage in the pipeline. liteParsedPipeline.tickGlobalStageCounters(); // Add 'command' object to explain output. if (expCtx->explain) { explain_common::appendIfRoom( aggregation_request_helper::serializeToCommandObj(request), "command", result); } }
- is related to
-
SERVER-44689 Add serverStatus counter for each use of an aggregation stage in a user's request
- Closed