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

Find & list all "stage" values from the new query plan in the docs

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Currently, there is at least one undocumented query plan stage, "KEEP_MUTATIONS". I have no idea what it's doing. We should probably put a reference for all possible values here.

      Output:

      shard02:PRIMARY> db.foo.find( { a : 1, b : 1 } ).explain()
      {
      	"queryPlanner" : {
      		"plannerVersion" : 1,
      		"parsedQuery" : {
      			"$and" : [
      				{
      					"a" : {
      						"$eq" : 1
      					}
      				},
      				{
      					"b" : {
      						"$eq" : 1
      					}
      				}
      			]
      		},
      		"winningPlan" : {
      			"stage" : "KEEP_MUTATIONS",
      			"inputStage" : {
      				"stage" : "FETCH",
      				"filter" : {
      					"a" : {
      						"$eq" : 1
      					}
      				},
      				"inputStage" : {
      					"stage" : "IXSCAN",
      
      
      					"keyPattern" : {
      						"b" : 1
      					},
      					"isMultiKey" : false,
      					"direction" : "forward",
      					"indexBounds" : {
      						"b" : [
      							"[1.0, 1.0]"
      						]
      					}
      				}
      			}
      		},
      		"rejectedPlans" : [
      			{
      				"stage" : "FETCH",
      				"inputStage" : {
      					"stage" : "IXSCAN",
      					"keyPattern" : {
      						"a" : 1,
      						"b" : 1
      					},
      					"isMultiKey" : false,
      					"direction" : "forward",
      					"indexBounds" : {
      						"a" : [
      							"[1.0, 1.0]"
      						],
      						"b" : [
      							"[1.0, 1.0]"
      						]
      					}
      				}
      			}
      		]
      	},
      	"serverInfo" : {
      		"host" : "cross-mb-air.local",
      		"port" : 27021,
      		"version" : "2.8.0-rc2",
      		"gitVersion" : "f77869e01a6ed235695a46fad441c0dff15202f6"
      	},
      	"ok" : 1
      }
      

      This is on 2.8.0-rc2, in the shell. I've got a sharded cluster (3 shards) each with 3 replica sets. I've launched them all with mlaunch v.1.1.7, with, at the bash prompt:

      mlaunch init --replicaset --sharded 3
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            william.cross William Cross
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              9 years, 20 weeks ago