Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13197

Investigate changes in SERVER-38691: serverInfo not present in explain output for aggregation

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.2, 4.0.14, 4.3.2, 3.6.16
    • Component/s: manual, Server
    • Labels:
      None

      Description

      Description

      Downstream Change Summary

      Previously, an aggregation explain plan would sometimes not include serverInfo; this has been fixed.

      Also, for a sharded explain plan, we previously only included the serverInfo for each shard. Now we also include the serverInfo for the mongos. (https://docs.mongodb.com/manual/reference/explain-results/index.html#serverinfo)

      Description of Linked Ticket

      Explain output for find commands include a  serverInfo object that contains version information:

      > db.foo.explain().find().finish().serverInfo
      {
      	"host" : "MacBook-Pro.local",
      	"port" : 27017,
      	"version" : "4.1.4",
      	"gitVersion" : "2f4b5918497b09a226a3ec5dcff930edd52ea1e9"
      } 

      However, this information is not available for aggregation commands:

      > db.foo.explain().aggregate([])
      {
      	"stages" : [
      		{
      			"$cursor" : {
      				"query" : {
      					
      				},
      				"queryPlanner" : {
      					"plannerVersion" : 1,
      					"namespace" : "test.foo",
      					"indexFilterSet" : false,
      					"parsedQuery" : {
      						
      					},
      					"queryHash" : "8B3D4AB8",
      					"winningPlan" : {
      						"stage" : "COLLSCAN",
      						"direction" : "forward"
      					},
      					"rejectedPlans" : [ ]
      				}
      			}
      		}
      	],
      	"ok" : 1
      } 

      This would be helpful to include for more complete information when troubleshooting .

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jeffrey.allen Jeffrey Allen
              Reporter:
              backlog-server-pm Backlog - Core Eng Program Management Team
              Participants:
              Last commenter:
              Jeffrey Allen Jeffrey Allen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since reply:
                1 year, 32 weeks ago
                Date of 1st Reply: