File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -625,17 +625,24 @@ class ServerSessionPool {
625625
626626// TODO: this should be codified in command construction
627627// @see https://github.com/mongodb/specifications/blob/master/source/read-write-concern/read-write-concern.rst#read-concern
628- function commandSupportsReadConcern ( command ) {
629- return (
628+ function commandSupportsReadConcern ( command , options ) {
629+ if (
630630 command . aggregate ||
631631 command . count ||
632632 command . distinct ||
633633 command . find ||
634- command . mapReduce ||
635634 command . parallelCollectionScan ||
636635 command . geoNear ||
637636 command . geoSearch
638- ) ;
637+ ) {
638+ return true ;
639+ }
640+
641+ if ( command . mapReduce && options . out && ( options . out . inline === 1 || options . out === 'inline' ) ) {
642+ return true ;
643+ }
644+
645+ return false ;
639646}
640647
641648/**
You can’t perform that action at this time.
0 commit comments