File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -771,6 +771,11 @@ Glossary
771
771
need to run :dbcommand:`cleanupOrphaned` to delete orphaned
772
772
documents.
773
773
774
+ orphaned cursor
775
+ A cursor that is not properly closed or iterated over
776
+ in your application code. Orphaned cursors can cause performance
777
+ issues in your MongoDB deployment.
778
+
774
779
passive member
775
780
A member of a :term:`replica set` that cannot become primary
776
781
because its :rsconf:`members[n].priority` is
Original file line number Diff line number Diff line change 2
2
cursor.noCursorTimeout()
3
3
========================
4
4
5
- .. default-domain:: mongodb
5
+ .. contents:: On this page
6
+ :local:
7
+ :backlinks: none
8
+ :depth: 1
9
+ :class: singlecol
6
10
7
11
Definition
8
12
----------
@@ -43,6 +47,11 @@ cursor being configured with :method:`~cursor.noCursorTimeout`. When the
43
47
application requests the next batch of documents, the server returns an
44
48
error.
45
49
50
+ .. _refresh-session-cursor-example:
51
+
52
+ Refresh a Cursor with ``refreshSessions``
53
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54
+
46
55
For operations that return a cursor, if the cursor may be idle for
47
56
longer than 30 minutes, issue the operation within an explicit session
48
57
using :method:`Mongo.startSession()` and periodically refresh the
Original file line number Diff line number Diff line change @@ -1207,6 +1207,21 @@ General Parameters
1207
1207
cursor modifier to analyze the average query time and select an appropriate
1208
1208
timeout period.
1209
1209
1210
+ .. warning::
1211
+
1212
+ Starting in MongoDB 4.4.8, MongoDB cleans up
1213
+ :term:`orphaned cursors <orphaned cursor>` linked to sessions as
1214
+ part of session management. This means that orphaned cursors with
1215
+ session ids do not use ``cursorTimeoutMillis`` to control the
1216
+ timeout.
1217
+
1218
+ For operations that return a cursor and have an idle period
1219
+ longer than :parameter:`localLogicalSessionTimeoutMinutes`,
1220
+ use :method:`Mongo.startSession()` to perform the operation
1221
+ within an explicit session. To refresh the session, run
1222
+ the :dbcommand:`refreshSessions` command. For details, see
1223
+ :ref:`<refresh-session-cursor-example>`.
1224
+
1210
1225
.. parameter:: failIndexKeyTooLong
1211
1226
1212
1227
*Removed in 4.4*
You can’t perform that action at this time.
0 commit comments