Skip to content

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

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
8 changes: 8 additions & 0 deletions config/redirects
Original file line number Diff line number Diff line change
Expand Up @@ -1784,3 +1784,11 @@ raw: /manual/core/wildcard -> ${base}/manual/core/index-wildcard/
[v3.4-v4.0]: /${version}/reference/mongodb-defaults -> ${base}/${version}/reference/

[v3.6-*]: /${version}/reference/command/clean -> ${base}/${version}/reference/command/nav-administration/

#
# Redirects for 5.0 and greater (if pages are removed in 4.4 that used to exist in earlier versions)
#

[v5.0-*]: /${version}/reference/command/isMaster -> ${base}/${version}/reference/command/hello
[v5.0-*]: /${version}/reference/method/db.isMaster -> ${base}/${version}/reference/method/db.hello

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
8 changes: 6 additions & 2 deletions source/includes/extracts-server-status-projection-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ content: |

- :serverstatus:`metrics.commands.update.arrayFilters`

- :serverstatus:`metrics.commands.findAndModify.arrayFilters`
- :serverstatus:`metrics.commands.findAndModify.arrayFilters`

- Added new metric to track number of times ``newlyAdded`` fields
were automatically removed:

- :serverstatus:`metrics.repl.reconfig.numAutoReconfigsForRemovalOfNewlyAddedFields`

- Replaced :serverstatus:`opReadConcernCounters` with
:serverstatus:`readConcernCounters` to track use of read concern
levels specified by query operations
Expand All @@ -56,6 +56,10 @@ content: |

- :serverstatus:`metrics.cursor.totalOpened`

- Added new metric to track hello commands:

- :serverstatus:`connections.exhaustHello`

- Starting in MongoDB 4.4, {{operationName}}:

- Added new metrics to track write concern failures caused
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 @@ -115,7 +115,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
4 changes: 2 additions & 2 deletions source/reference/command.txt
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ Replication Commands

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

* - :dbcommand:`isMaster`
* - :dbcommand:`hello`

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

* - :dbcommand:`replSetAbortPrimaryCatchUp`

Expand Down
Loading