File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ const WriteConcern = require('../write_concern');
8
8
const maxWireVersion = require ( '../core/utils' ) . maxWireVersion ;
9
9
const commandSupportsReadConcern = require ( '../core/sessions' ) . commandSupportsReadConcern ;
10
10
11
+ const SUPPORTS_WRITE_CONCERN_AND_COLLATION = 5 ;
12
+
11
13
class CommandOperationV2 extends OperationBase {
12
14
constructor ( parent , options ) {
13
15
super ( options ) ;
@@ -42,7 +44,7 @@ class CommandOperationV2 extends OperationBase {
42
44
Object . assign ( cmd , { readConcern : this . readConcern } ) ;
43
45
}
44
46
45
- if ( serverWireVersion >= 5 ) {
47
+ if ( serverWireVersion >= SUPPORTS_WRITE_CONCERN_AND_COLLATION ) {
46
48
if ( this . writeConcern && this . hasAspect ( Aspect . WRITE_OPERATION ) ) {
47
49
Object . assign ( cmd , { writeConcern : this . writeConcern } ) ;
48
50
}
You can’t perform that action at this time.
0 commit comments