Skip to content

Commit

Permalink
DOCSP-28324 Update getShardDistribution method syntax (#6241) (#6268)
Browse files Browse the repository at this point in the history
* DOCSP-28324 remove tip and update syntax

* DOCSP-28324 fix build error

* DOCSP-28324 fix build error
  • Loading branch information
jocelyn-mendez1 authored Feb 6, 2024
1 parent 61b0866 commit b00139d
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions source/reference/method/db.collection.getShardDistribution.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,15 @@ Definition
Prints the data distribution statistics for a :term:`sharded
<sharding>` collection.

.. tip::

Before running the method, use the :dbcommand:`flushRouterConfig`
command to refresh the cached routing table to avoid returning
stale distribution information for the collection. Once
refreshed, run :method:`db.collection.getShardDistribution()` for
the collection you wish to build the index.
Syntax
------

For example:
The :method:`~db.collection.getShardDistribution()` method has the following
form:

.. code-block:: javascript
.. code-block:: javascript

db.adminCommand( { flushRouterConfig: "test.myShardedCollection" } );
db.getSiblingDB("test").myShardedCollection.getShardDistribution();
db.collection.getShardDistribution()

.. seealso::

Expand Down

0 comments on commit b00139d

Please sign in to comment.