Skip to content

(DOCS-13197): Explain result improvements for mongos #4132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion source/reference/explain-results.txt
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,8 @@ the ``explain`` operation.
content: |

For sharded collections, ``explain`` returns the
``serverInfo`` for each accessed shard.
``serverInfo`` for each accessed shard, and a top-level
``serverInfo`` object for the :binary:`~bin.mongos`.

.. code-block:: none

Expand All @@ -659,6 +660,16 @@ the ``explain`` operation.
}
...
]
}
},
"serverInfo" : { // serverInfo for mongos
"host" : <string>,
"port" : <int>,
"version" : <string>,
"gitVersion" : <string>
}
...


3.0 Format Change
-----------------
Expand Down
20 changes: 20 additions & 0 deletions source/release-notes/4.4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,26 @@ response from the KMIP server before giving up, or retrying:

These settings are available in MongoDB Enterprise only.

Improvements to ``explain`` Results
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Starting in version 4.4 (and 4.2.2, 4.0.14, 3.6.16):

- :doc:`Explain results </reference/explain-results/>` for commands run
on sharded clusters include a top-level :ref:`serverInfo <serverInfo>`
object for the :binary:`~bin.mongos` in addition to the ``serverInfo``
objects returned for each shard.

- :doc:`Explain results </reference/explain-results/>` include the
:ref:`serverInfo <serverInfo>` object when
:data:`~explain.queryPlanner.optimizedPipeline` is ``true``. In
previous versions of MongoDB, ``explain`` results would occasionally
not include the ``serverInfo`` object when
:data:`~explain.queryPlanner.optimizedPipeline` was ``true``.

.. seealso::

:doc:`Explain results </reference/explain-results/>`.

:doc:`Changes Affecting Compatibility </release-notes/4.4-compatibility>`
-------------------------------------------------------------------------
Expand Down