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 @@ -708,6 +708,11 @@ Glossary
708
708
need to run :dbcommand:`cleanupOrphaned` to delete orphaned
709
709
documents.
710
710
711
+ orphaned cursor
712
+ A cursor that is not properly closed or iterated over
713
+ in your application code. Orphaned cursors can cause performance
714
+ issues in your MongoDB deployment.
715
+
711
716
passive member
712
717
A member of a :term:`replica set` that cannot become primary
713
718
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 @@ -1030,6 +1030,21 @@ General Parameters
1030
1030
cursor modifier to analyze the average query time and select an appropriate
1031
1031
timeout period.
1032
1032
1033
+ .. warning::
1034
+
1035
+ Starting in MongoDB 4.4.8, MongoDB cleans up
1036
+ :term:`orphaned cursors <orphaned cursor>` linked to sessions as
1037
+ part of session management. This means that orphaned cursors with
1038
+ session ids do not use ``cursorTimeoutMillis`` to control the
1039
+ timeout.
1040
+
1041
+ For operations that return a cursor and have an idle period
1042
+ longer than :parameter:`localLogicalSessionTimeoutMinutes`,
1043
+ use :method:`Mongo.startSession()` to perform the operation
1044
+ within an explicit session. To refresh the session, run
1045
+ the :dbcommand:`refreshSessions` command. For details, see
1046
+ :ref:`<refresh-session-cursor-example>`.
1047
+
1033
1048
.. parameter:: failIndexKeyTooLong
1034
1049
1035
1050
*Removed in 4.4*
You can’t perform that action at this time.
0 commit comments