Skip to content

Commit 6e652ee

Browse files
author
Bob Grabar
committed
minor: edits
1 parent 4de70b7 commit 6e652ee

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

source/core/sharding-internals.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ Determine if You are Connected to a :program:`mongos`
516516

517517
If your application must determine whether it is connected to a
518518
:program:`mongos`, use the :dbcommand:`isMaster` command. If the
519-
application is connected to :program:`mongos`, the :dbcommand:`isMaster`
519+
application is connected to a :program:`mongos`, the :dbcommand:`isMaster`
520520
command returns a document with the string ``isdbgrid`` in the ``msg``
521521
field. For example:
522522

source/reference/command/isdbGrid.txt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,21 @@ isdbgrid
88

99
This command verifies that a process is a :program:`mongos`.
1010

11-
If you issue the :dbcommand:`isdbgrid` command when connected to a :program:`mongos`, the response document
12-
resembles the following:
11+
If you issue the :dbcommand:`isdbgrid` command when connected to a
12+
:program:`mongos`, the response document includes the ``isdbgrid``
13+
field set to ``1``. The returned document is similar to the
14+
following:
1315

1416
.. code-block:: javascript
1517

1618
{ "isdbgrid" : 1, "hostname" : "app.example.net", "ok" : 1 }
1719

18-
However, if you issue the :dbcommand:`isdbgrid` command when conneted
19-
to a :program:`mongod`, the returned document also might include a
20-
line that reads ``"isdbgrid" : 1``, though in this case as part of an
21-
error message. The :dbcommand:`isdbgrid` command is not available to
22-
:program:`mongod` and returns an error document similar to the following:
20+
If you issue the :dbcommand:`isdbgrid` command when connected to a
21+
:program:`mongod`, MongoDB returns an error document. The
22+
:dbcommand:`isdbgrid` command is not available to :program:`mongod`.
23+
The error document, however, also includes a line that reads
24+
``"isdbgrid" : 1``, just as in the document returned for a
25+
:program:`mongos`. The error document is similar to the following:
2326

2427
.. code-block:: javascript
2528

@@ -33,6 +36,6 @@ isdbgrid
3336

3437
You can instead use the :dbcommand:`isMaster` command to determine
3538
connection to a :program:`mongos`. When connected to a
36-
:program:`mongos`, the :dbcommand:`isMaster` returns a document that
39+
:program:`mongos`, the :dbcommand:`isMaster` command returns a document that
3740
contains the string ``isdbgrid`` in the ``msg`` field.
3841

0 commit comments

Comments
 (0)