Skip to content

(DOCS-9990, -10826): Updated flushRouterConfig. #3262

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 2 commits into from
Mar 18, 2018
Merged
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
33 changes: 24 additions & 9 deletions source/reference/command/flushRouterConfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,36 @@ flushRouterConfig

.. dbcommand:: flushRouterConfig

:dbcommand:`flushRouterConfig` clears the current cluster
information cached by a :binary:`~bin.mongos` instance and reloads all
:term:`sharded cluster` metadata from the :term:`config database`.
:dbcommand:`flushRouterConfig` clears the cached routing table in a
:binary:`~bin.mongos` instance. Subsequent commands against that
:binary:`~bin.mongos` will repopulate the routing table cache from
the :term:`config server` as they execute.

This forces an update when the configuration database holds data
that is newer than the data cached in the :binary:`~bin.mongos`
process.
Use this command to force the routing table cache to be refreshed
from the :term:`config server` if it contains more recent data. In
most cases, this happens automatically. You should need to run
:dbcommand:`flushRouterConfig` only after :dbcommand:`movePrimary`
has been run.

.. seealso::

For when and why :dbcommand:`flushRouterConfig` is run, see
**Considerations** on the :dbcommand:`movePrimary` page.

.. warning::

Do not modify the config data, except as explicitly
documented. A config database cannot typically tolerate manual
manipulation.
Do not modify the routing table data except when it is
explicitly documented.

:dbcommand:`flushRouterConfig` is an administrative command that is
only available for :binary:`~bin.mongos` instances.

Call this command using the following form:

.. example::

.. code-block:: javascript

db.adminCommand("flushRouterConfig")

.. versionadded:: 1.8.2