Skip to content

DOCSP-8628: Document new 'hello' command #5270

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
Apr 30, 2021
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
2 changes: 1 addition & 1 deletion source/core/replica-set-hidden-member.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data set but is **invisible** to client applications. Hidden members
are good for workloads with different usage patterns from the other
members in the :term:`replica set`. Hidden members must always be
:ref:`priority 0 members <replica-set-secondary-only-members>` and
so **cannot become primary**. The :method:`db.isMaster()` method does not
so **cannot become primary**. The :method:`db.hello()` method does not
display hidden members. Hidden members, however, **may vote** in
:ref:`elections <replica-set-elections>`.

Expand Down
6 changes: 3 additions & 3 deletions source/core/sharded-cluster-query-router.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,15 @@ Confirm Connection to ``mongos`` Instances
------------------------------------------

To detect if the MongoDB instance that your client is connected
to is :binary:`~bin.mongos`, use the :dbcommand:`isMaster` command. When a
client connects to a :binary:`~bin.mongos`, :dbcommand:`isMaster` returns
to is :binary:`~bin.mongos`, use the :dbcommand:`hello` command. When a
client connects to a :binary:`~bin.mongos`, :dbcommand:`hello` returns
a document with a ``msg`` field that holds the string
``isdbgrid``. For example:

.. code-block:: javascript

{
"ismaster" : true,
"isWritablePrimary" : true,
"msg" : "isdbgrid",
"maxBsonObjectSize" : 16777216,
"ok" : 1,
Expand Down
2 changes: 1 addition & 1 deletion source/includes/extracts-transactions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ content: |
ref: transactions-operations-restrictions-info
content: |

Informational commands, such as :dbcommand:`isMaster`,
Informational commands, such as :dbcommand:`hello`,
:dbcommand:`buildInfo`, :dbcommand:`connectionStatus` (and their
helper methods) are allowed in transactions; however, they cannot be
the first operation in the transaction.
Expand Down
2 changes: 1 addition & 1 deletion source/includes/fact-bulkwrite-operation-batches.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The number of operations in each group cannot exceed the value of
the :limit:`maxWriteBatchSize <Write Command Batch Limit Size>` of
the database. As of MongoDB 3.6, this value is ``100,000``.
This value is shown in the :data:`isMaster.maxWriteBatchSize` field.
This value is shown in the :data:`hello.maxWriteBatchSize` field.

This limit prevents issues with oversized error messages. If a group
exceeds this :limit:`limit <Write Command Batch Limit Size>`,
Expand Down
6 changes: 5 additions & 1 deletion source/reference/command.txt
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,13 @@ Replication Commands

- Internal command that applies :term:`oplog` entries to the current data set.

* - :dbcommand:`hello`

- Displays information about this member's role in the replica set, including whether it is the primary.

* - :dbcommand:`isMaster`

- Displays information about this member's role in the replica set, including whether it is the master.
- *Deprecated*. Use :dbcommand:`hello` instead.

* - :dbcommand:`replSetAbortPrimaryCatchUp`

Expand Down
Loading