Skip to content

Commit e49ee59

Browse files
corryrootjmd-mongo
andauthored
(DOCSP-28580): Backport DOCSP-27811 to v6.0. (#2510) (#3578)
Co-authored-by: jmd-mongo <[email protected]>
1 parent 992a17c commit e49ee59

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

Lines changed: 8 additions & 6 deletions
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.

0 commit comments

Comments
 (0)