File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -625,17 +625,24 @@ class ServerSessionPool {
625
625
626
626
// TODO: this should be codified in command construction
627
627
// @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 (
630
630
command . aggregate ||
631
631
command . count ||
632
632
command . distinct ||
633
633
command . find ||
634
- command . mapReduce ||
635
634
command . parallelCollectionScan ||
636
635
command . geoNear ||
637
636
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 ;
639
646
}
640
647
641
648
/**
You can’t perform that action at this time.
0 commit comments