You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/application-performance-monitoring.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The MongoDB C Driver allows you to monitor all the MongoDB operations the driver
8
8
* `Command Monitoring <https://github.com/mongodb/specifications/blob/master/source/command-monitoring/command-monitoring.rst>`_: events related to all application operations.
9
9
* `SDAM Monitoring <https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-monitoring.rst>`_: events related to the driver's Server Discovery And Monitoring logic.
10
10
11
-
To receive notifications, create a ``mongoc_apm_callbacks_t`` with :symbol:`mongoc_apm_callbacks_new <mongoc_apm_callbacks_new>`, set callbacks on it, then pass it to :symbol:`mongoc_client_set_apm_callbacks <mongoc_client_set_apm_callbacks>` or :symbol:`mongoc_client_pool_set_apm_callbacks <mongoc_client_pool_set_apm_callbacks>`.
11
+
To receive notifications, create a ``mongoc_apm_callbacks_t`` with :symbol:`mongoc_apm_callbacks_new`, set callbacks on it, then pass it to :symbol:`mongoc_client_set_apm_callbacks` or :symbol:`mongoc_client_pool_set_apm_callbacks`.
Copy file name to clipboardExpand all lines: doc/bulk.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ This tutorial explains how to take advantage of MongoDB C driver bulk write oper
8
8
Bulk Insert
9
9
-----------
10
10
11
-
First we need to fetch a bulk operation handle from the :symbol:`mongoc_collection_t <mongoc_collection_t>`. This can be performed in either ordered or unordered mode. Unordered mode allows for greater parallelization when working with sharded clusters.
11
+
First we need to fetch a bulk operation handle from the :symbol:`mongoc_collection_t`. This can be performed in either ordered or unordered mode. Unordered mode allows for greater parallelization when working with sharded clusters.
12
12
13
13
.. code-block:: c
14
14
@@ -17,13 +17,13 @@ First we need to fetch a bulk operation handle from the :symbol:`mongoc_collecti
17
17
18
18
We can now start inserting documents to the bulk operation. These will be buffered until we execute the operation.
19
19
20
-
The bulk operation will coalesce insertions as a single batch for each consecutive call to :symbol:`mongoc_bulk_operation_insert() <mongoc_bulk_operation_insert>`. This creates a pipelined effect when possible.
20
+
The bulk operation will coalesce insertions as a single batch for each consecutive call to :symbol:`mongoc_bulk_operation_insert()`. This creates a pipelined effect when possible.
21
21
22
22
.. tip::
23
23
24
24
The bulk operation API will automatically handle MongoDB servers < 2.6 by speaking the old wire protocol. However, some performance degradation may occur.
25
25
26
-
To execute the bulk operation and receive the result we call :symbol:`mongoc_bulk_operation_execute() <mongoc_bulk_operation_execute>`.
26
+
To execute the bulk operation and receive the result we call :symbol:`mongoc_bulk_operation_execute()`.
27
27
28
28
.. literalinclude:: ../examples/bulk/bulk1.c
29
29
:language: c
@@ -48,7 +48,7 @@ MongoDB C driver also supports executing mixed bulk write operations. A batch of
48
48
49
49
.. tip::
50
50
51
-
Though the following API will work with all versions of MongoDB, it is designed to be used with MongoDB versions >= 2.6. Much better bulk insert performance can be achieved with older versions of MongoDB through the deprecated :symbol:`mongoc_collection_insert_bulk() <mongoc_collection_insert_bulk>` method.
51
+
Though the following API will work with all versions of MongoDB, it is designed to be used with MongoDB versions >= 2.6. Much better bulk insert performance can be achieved with older versions of MongoDB through the deprecated :symbol:`mongoc_collection_insert_bulk()` method.
52
52
53
53
Ordered Bulk Write Operations
54
54
-----------------------------
@@ -150,7 +150,7 @@ The :symbol:`bson_error_t <errors>` domain is ``MONGOC_ERROR_COMMAND``.
150
150
Bulk Operation Write Concerns
151
151
-----------------------------
152
152
153
-
By default bulk operations are executed with the :symbol:`write_concern <mongoc_write_concern_t>` of the collection they are executed against. A custom write concern can be passed to the :symbol:`mongoc_collection_create_bulk_operation() <mongoc_collection_create_bulk_operation>` method. Write concern errors (e.g. wtimeout) will be reported after all operations are attempted, regardless of execution order.
153
+
By default bulk operations are executed with the :symbol:`write_concern <mongoc_write_concern_t>` of the collection they are executed against. A custom write concern can be passed to the :symbol:`mongoc_collection_create_bulk_operation()` method. Write concern errors (e.g. wtimeout) will be reported after all operations are attempted, regardless of execution order.
Copy file name to clipboardExpand all lines: doc/cursors.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,14 +39,14 @@ While iterating cursors, you should check to see if an error has occurred. See t
39
39
Destroying Server-Side Cursors
40
40
------------------------------
41
41
42
-
The MongoDB C driver will automatically destroy a server-side cursor when :symbol:`mongoc_cursor_destroy() <mongoc_cursor_destroy>` is called. Failure to call this function when done with a cursor will leak memory client side as well as consume extra memory server side. If the cursor was configured to never timeout, it will become a memory leak on the server.
42
+
The MongoDB C driver will automatically destroy a server-side cursor when :symbol:`mongoc_cursor_destroy()` is called. Failure to call this function when done with a cursor will leak memory client side as well as consume extra memory server side. If the cursor was configured to never timeout, it will become a memory leak on the server.
43
43
44
44
.. _cursors_tailable:
45
45
46
46
Tailable Cursors
47
47
----------------
48
48
49
-
Tailable cursors are cursors that remain open even after they've returned a final result. This way, if more documents are added to a collection (i.e., to the cursor's result set), then you can continue to call :symbol:`mongoc_cursor_next() <mongoc_cursor_next>` to retrieve those additional results.
49
+
Tailable cursors are cursors that remain open even after they've returned a final result. This way, if more documents are added to a collection (i.e., to the cursor's result set), then you can continue to call :symbol:`mongoc_cursor_next()` to retrieve those additional results.
50
50
51
51
Here's a complete test case that demonstrates the use of tailable cursors.
52
52
@@ -68,5 +68,5 @@ Let's compile and run this example against a replica set to see updates as they
68
68
69
69
The line of output is a sample from performing ``db.test.insert({})`` from the mongo shell on the given replicaSet.
70
70
71
-
See also :symbol:`mongoc_cursor_set_max_await_time_ms <mongoc_cursor_set_max_await_time_ms>`.
71
+
See also :symbol:`mongoc_cursor_set_max_await_time_ms`.
0 commit comments