Skip to content

Commit 9b44ddd

Browse files
authored
DOCSP-33952: Atomic typos (#319)
* DOCSP-33952: Atomic typos * tagging * style guide edits * more tagging * vale * RR feedback
1 parent e91eeff commit 9b44ddd

24 files changed

+131
-85
lines changed

Diff for: source/connection-troubleshooting.txt

+28-21
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
Connection Troubleshooting
55
==========================
66

7+
.. facet::
8+
:name: genre
9+
:values: reference
10+
11+
.. meta::
12+
:keywords: code example, disconnected, deployment
13+
714
.. contents:: On this page
815
:local:
916
:backlinks: none
@@ -27,7 +34,7 @@ using the {+driver-long+} to connect to a MongoDB deployment.
2734
questions, discussions, or general technical support
2835

2936
Connection Error
30-
~~~~~~~~~~~~~~~~
37+
----------------
3138

3239
The following error message is a general message indicating that the driver
3340
cannot connect to a server on the specified hostname or port:
@@ -42,7 +49,7 @@ The following sections describe methods that may help resolve the issue.
4249
.. _golang-troubleshooting-connection-string-port:
4350

4451
Check Connection String
45-
-----------------------
52+
~~~~~~~~~~~~~~~~~~~~~~~
4653

4754
Verify that the hostname and port number in the connection string are both
4855
accurate. In the sample error message, the hostname is ``127.0.0.1`` and the
@@ -52,7 +59,7 @@ port is ``27017``. The default port value for a MongoDB instance is
5259
.. _golang-troubleshooting-connection-firewall:
5360

5461
Configure Firewall
55-
------------------
62+
~~~~~~~~~~~~~~~~~~
5663

5764
Assuming that your MongoDB deployment uses the default port, verify that port
5865
``27017`` is open in your firewall. If your deployment uses a different port,
@@ -64,7 +71,7 @@ verify the correct port is open in your firewall.
6471
used by your MongoDB instance.
6572

6673
Authentication Error
67-
~~~~~~~~~~~~~~~~~~~~
74+
--------------------
6875

6976
The {+driver-short+} can fail to connect to a MongoDB instance if
7077
the authorization is not configured correctly. In these cases, the driver raises
@@ -88,7 +95,7 @@ The following sections describe methods that may help resolve the issue.
8895
.. _golang-troubleshooting-connection-string-auth:
8996

9097
Check Connection String
91-
-----------------------
98+
~~~~~~~~~~~~~~~~~~~~~~~
9299

93100
An invalid connection string is the most common cause of authentication
94101
issues when attempting to connect to MongoDB.
@@ -110,15 +117,15 @@ are in the correct format.
110117

111118
: / ? # [ ] @
112119

113-
When connecting to a replica set, you should include all of the hosts
114-
in the replica set in your connection string. Separate each of the hosts
115-
in the connection string with a comma. This enables the driver to establish a
116-
connection if one of the hosts is unreachable.
120+
When connecting to a replica set, include all the replica set hosts
121+
in your connection string. Separate each of the hosts in the connection
122+
string with a comma. This enables the driver to establish a connection
123+
if one of the hosts is unreachable.
117124

118125
.. _golang-troubleshooting-connection-auth-mechanism:
119126

120127
Verify the Authentication Mechanism
121-
-----------------------------------
128+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
122129

123130
Ensure that your credentials and authentication mechanism are correct. You can
124131
store your authentication credentials in environment variables or you can pass
@@ -130,7 +137,7 @@ To learn more about authentication, see the
130137
.. _golang-troubleshooting-connection-admin:
131138

132139
Verify User Is in Authentication Database
133-
-----------------------------------------
140+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
134141

135142
To successfully authenticate a connection by using a username and password,
136143
the username must be defined in the authentication database. The default
@@ -146,7 +153,7 @@ database:
146153
client := mongo.Connect(uri)
147154

148155
Error Sending Message
149-
~~~~~~~~~~~~~~~~~~~~~
156+
---------------------
150157

151158
When the driver fails to send a command after you make a request,
152159
it often displays the following general error message:
@@ -159,38 +166,38 @@ it often displays the following general error message:
159166
The following sections describe methods that may help resolve the issue.
160167

161168
Check Connection String
162-
-----------------------
169+
~~~~~~~~~~~~~~~~~~~~~~~
163170

164171
Verify that the connection string in your app is accurate. For more information
165172
about verifying your connection string, see
166173
:ref:`Connection Error <golang-troubleshooting-connection-string-port>`
167174
and :ref:`Authentication Error <golang-troubleshooting-connection-string-auth>`.
168175

169176
Verify the Authentication Mechanism
170-
-----------------------------------
177+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
171178

172179
Make sure you are using the correct authentication mechanism and credentials.
173180
For more information about authentication errors, see
174181
:ref:`Authentication Error <golang-troubleshooting-connection-auth-mechanism>`.
175182

176183
Verify User Is in Authentication Database
177-
-----------------------------------------
184+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
178185

179186
Verify the user is in the correct authentication database. For more
180187
information about the authentication database, see
181188
:ref:`Authentication Error <golang-troubleshooting-connection-admin>`.
182189

183190
Configure Firewall
184-
------------------
191+
~~~~~~~~~~~~~~~~~~
185192

186-
The firewall needs to have an open port for communicating with the MongoDB
193+
The firewall must have an open port for communicating with the MongoDB
187194
instance. For more information about configuring the firewall, see
188195
:ref:`Connection Error <golang-troubleshooting-connection-firewall>`.
189196

190197
.. _golang-troubleshooting-connection-number-connections:
191198

192199
Check the Number of Connections
193-
-------------------------------
200+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
194201

195202
Each ``MongoClient`` instance supports a maximum number of concurrent open
196203
connections in its connection pool. The configuration parameter ``maxPoolSize``
@@ -203,7 +210,7 @@ connection pooling works, see
203210
in the FAQ.
204211

205212
Timeout Error
206-
~~~~~~~~~~~~~
213+
-------------
207214

208215
Sometimes when you send a request through the driver to the server, the request
209216
times out. When this happens, you might receive an error message
@@ -218,7 +225,7 @@ If you receive this error, try the following methods to resolve the
218225
issue.
219226

220227
Set Timeout Option
221-
------------------
228+
~~~~~~~~~~~~~~~~~~
222229

223230
The ``Client`` supports a single ``Timeout`` option that controls the amount of
224231
time a single operation can take to execute. You can set this value by using
@@ -234,7 +241,7 @@ connection string option:
234241
client := mongo.Connect(uri)
235242

236243
Check the Number of Connections
237-
-------------------------------
244+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238245

239246
The number of connections to the server may exceed ``maxPoolSize``. For more
240247
information about checking the number of connections, see

Diff for: source/faq.txt

+9-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
FAQ
55
===
66

7-
.. default-domain:: mongodb
7+
.. facet::
8+
:name: genre
9+
:values: reference
10+
11+
.. meta::
12+
:keywords: code example, connection error, question, help
813

914
.. contents:: On this page
1015
:local:
@@ -46,7 +51,7 @@ The ``Client`` instance opens two additional sockets per server in your
4651
MongoDB topology for monitoring the server's state.
4752

4853
For example, a client connected to a 3-node replica set opens 6
49-
monitoring sockets. It also opens as many sockets as needed to support
54+
monitoring sockets. It also opens the necessary sockets to support
5055
an application's concurrent operations on each server, up to
5156
the value of ``maxPoolSize``. If ``maxPoolSize`` is ``100`` and the
5257
application only uses the primary (the default), then only the primary
@@ -150,10 +155,10 @@ variable as a ``bson.D`` type so that the driver can convert it to BSON:
150155
How Do I Convert a BSON Document to JSON?
151156
-----------------------------------------
152157

153-
The driver provides a variety of marshaller methods that can be used to
158+
The driver provides a variety of marshaler methods that can be used to
154159
convert a BSON document to JSON, such as the ``MarshalExtJSON()``
155160
method. To view a readable form of the JSON encoding, you must use
156-
an unmarshaller method or string type-casting to parse the JSON byte
161+
an unmarshaler method or string type-casting to parse the JSON byte
157162
format.
158163

159164
The following code converts a BSON document to JSON using the

Diff for: source/fundamentals/auth.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ they are listed:
238238
.. literalinclude:: /includes/fundamentals/code-snippets/authentication/aws-connection-string.go
239239
:language: go
240240

241-
If you need to specify an AWS session token, use the temporary
241+
If you must specify an AWS session token, use the temporary
242242
credentials returned from an `assume role request <https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html>`__.
243243

244244
To use temporary credentials, assign the value of your ``sessionToken`` to
@@ -261,8 +261,8 @@ they are listed:
261261

262262
.. note::
263263

264-
If you don't need an AWS session token for the role you're
265-
authenticating with, omit the line containing ``AWS_SESSION_TOKEN`` .
264+
If you don't require an AWS session token for the role you're
265+
authenticating with, omit the line containing ``AWS_SESSION_TOKEN``.
266266

267267
After you've set the preceding environment variables, specify the ``MONGODB-AWS``
268268
authentication mechanism as shown in the following example:

Diff for: source/fundamentals/bson.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,9 @@ user-defined struct by using methods from the ``bson`` package:
331331
.. note::
332332

333333
You can use the ``Raw`` type to retrieve elements from a BSON
334-
document byte slice without unmarshalling it to a Go type. This can
335-
be useful if you need to look up individual elements without
336-
unmarshalling the entire BSON document.
334+
document byte slice without unmarshalling it to a Go type. This type
335+
allows you to look up individual elements without unmarshalling
336+
the entire BSON document.
337337

338338
To learn more about the marshalling and unmarshalling methods used with the
339339
``Cursor`` type, see the `Cursor API documentation <{+api+}/mongo#Cursor>`__

Diff for: source/fundamentals/collations.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ Set a Collation on an Index
166166
---------------------------
167167

168168
You can apply a collation when you create a new index on a collection. The index stores
169-
an ordered representation of the documents in the collection so your MongoDB instance
170-
does not need to perform the ordering for sorting operations in-memory.
169+
an ordered representation of the documents in the collection, so your MongoDB instance
170+
doesn't perform the ordering for sorting operations in-memory.
171171

172172
To use the index in an operation, your operation must use the same collation as the one
173173
specified in the index. Additionally, ensure that the operation is covered by the index that

Diff for: source/fundamentals/connections/connection-guide.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ options, read the :ref:`golang-connection-options` section of this guide.
6969
Connection Example
7070
~~~~~~~~~~~~~~~~~~
7171

72-
To connect to MongoDB, you need to create a client. A client manages
73-
your connections and runs database commands.
72+
To connect to MongoDB, you must create a client. A client manages your
73+
connections and runs database commands.
7474

7575
.. tip:: Reuse Your Client
7676

@@ -116,7 +116,7 @@ verify that the connection is successful:
116116
To learn about connecting to Atlas Serverless, see the
117117
:ref:`Serverless Instance Limitations page
118118
<atlas-serverless-drivers>` to identify the minimum driver version
119-
you need.
119+
required.
120120

121121
--------------------------------
122122
Other Ways to Connect to MongoDB
@@ -159,7 +159,7 @@ When connecting to a replica set, the driver takes the following actions by defa
159159

160160
.. tip::
161161

162-
You only need to specify one host to connect to a replica set.
162+
You can specify just one host to connect to a replica set.
163163
However, to ensure connectivity when the specified host
164164
is unavailable, you should provide the full list of hosts.
165165

Diff for: source/fundamentals/context.txt

+13-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
Context
55
=======
66

7-
.. default-domain:: mongodb
7+
.. facet::
8+
:name: genre
9+
:values: reference
10+
11+
.. meta::
12+
:keywords: code example, unblock
813

914
.. contents:: On this page
1015
:local:
@@ -17,7 +22,7 @@ Overview
1722

1823
The {+driver-long+} uses the `context package
1924
<https://pkg.go.dev/context>`__ from Go's standard library to allow
20-
applications to signal timeouts and cancelations for any **blocking method**
25+
applications to signal timeouts and cancellations for any **blocking method**
2126
call. A blocking method relies on an external event, such as a network
2227
input or output, to proceed with its task.
2328

@@ -72,19 +77,19 @@ The driver might block a method call if there are no available
7277
connections to check out.
7378

7479
After selecting a server, the driver tries to check out a connection
75-
from the servers connection pool. If the Context expires while checking
80+
from the server's connection pool. If the Context expires while checking
7681
out a connection, the method returns a timeout error.
7782

7883
Connection Establishment
7984
~~~~~~~~~~~~~~~~~~~~~~~~
8085

81-
The driver might block an method call if it needs to create a new
86+
The driver might block a method call if it must create a new
8287
connection.
8388

84-
When the driver needs to create a new connection to execute an
85-
operation, the Context sets a timeout for the establishment process. The
86-
driver sets the timeout to either the Context expiration or connection
87-
timeout, whichever is shorter.
89+
When the driver creates a new connection to perform an operation, the
90+
Context sets a timeout for the establishment process. The driver sets the
91+
timeout to either the Context expiration or connection timeout, whichever is
92+
shorter.
8893

8994
The following example sets the connection timeout to *1* second and the
9095
Context deadline to *2* seconds. Because the connection timeout is

Diff for: source/fundamentals/crud/compound-operations.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ MongoDB supports the following compound operations:
3131

3232
.. tip::
3333

34-
If you need to read and write to more than one document, use
35-
:ref:`transactions <golang-transactions>`.
34+
To learn how to perform compound operations on more than one document
35+
at a time, see the :ref:`Transactions <golang-transactions>` guide.
3636

3737
Sample Data
3838
~~~~~~~~~~~
@@ -79,8 +79,8 @@ the specified query filter and deletes it. The method returns a
7979
``FindOneAndDelete()`` in that you cannot specify a sort order for the
8080
matched documents.
8181

82-
If you don't need to find and delete a document in a single transaction, you can call
83-
the ``findOne()`` method followed by the ``deleteOne()`` method.
82+
To find a document and delete it in separate operations, call the
83+
``findOne()`` method followed by the ``deleteOne()`` method.
8484

8585
Modify Behavior
8686
~~~~~~~~~~~~~~~
@@ -168,7 +168,7 @@ document.
168168
``FindOneAndUpdate()`` in that you cannot specify a sort order for the
169169
matched documents.
170170

171-
If you don't need to find and update a document in a single transaction, you can call
171+
To find a document and update it in separate operations, call
172172
the ``findOne()`` method followed by the ``updateOne()`` method.
173173

174174
Modify Behavior

Diff for: source/fundamentals/crud/read-operations/cursor.txt

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
Access Data From a Cursor
55
=========================
66

7-
.. default-domain:: mongodb
7+
.. facet::
8+
:name: genre
9+
:values: reference
10+
11+
.. meta::
12+
:keywords: code example, read operation, see results, iterate
813

914
.. contents:: On this page
1015
:local:
@@ -104,7 +109,7 @@ method:
104109
Close the Cursor
105110
----------------
106111

107-
When your application no longer needs to use a cursor, close the cursor
112+
When your application no longer requires a cursor, close the cursor
108113
with the ``Close()`` method. This method frees the resources your cursor
109114
consumes in both the client application and the MongoDB server.
110115

Diff for: source/fundamentals/crud/write-operations/bulk.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Unordered
309309

310310
To execute bulk write operations in any order and continue if an error
311311
occurs, specify ``false`` to the ``SetOrdered()`` method. The method
312-
reports the errors afterwards.
312+
reports the errors afterward.
313313

314314
Example
315315
```````

0 commit comments

Comments
 (0)