Skip to content

Commit 8340c36

Browse files
authored
DOCSP-27811 updates sort-results-with-indexes to correct allowDiskUse language (mongodb#2510)
1 parent e8de41c commit 8340c36

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

source/tutorial/sort-results-with-indexes.txt

+8-6
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ A blocking sort indicates that MongoDB must consume and process all
2424
input documents to the sort before returning results. Blocking sorts do
2525
not block concurrent operations on the collection or database.
2626

27-
If MongoDB needs more than 100 megabytes of system memory for
28-
the blocking sort operation, MongoDB returns an error *unless* the query
29-
specifies :method:`cursor.allowDiskUse()` (*New in MongoDB 4.4*).
30-
:method:`~cursor.allowDiskUse()` allows MongoDB to use temporary files
31-
on disk to store data exceeding the 100 megabyte system memory limit
32-
while processing a blocking sort operation.
27+
Starting in MongoDB 6.0, if the server requires more than 100 megabytes
28+
of memory for a pipeline execution stage, MongoDB automatically writes
29+
temporary files to disk unless that query specifies
30+
``{ allowDiskUse: false }``. In versions 4.4 and 5.0, if the server
31+
needs more than 100 megabytes of system memory for the blocking sort
32+
operation, MongoDB returns an error unless that query specifies
33+
:method:`cursor.allowDiskUse()`. For details, see
34+
:parameter:`allowDiskUseByDefault`.
3335

3436
Sort operations that use an index often have better performance than
3537
blocking sorts. For more information on creating indexes to support

0 commit comments

Comments
 (0)