File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type { Collection } from '../collection';
3
3
import { MongoCompatibilityError , MongoServerError } from '../error' ;
4
4
import type { Server } from '../sdam/server' ;
5
5
import type { ClientSession } from '../sessions' ;
6
- import { Callback , maxWireVersion , MongoDBNamespace } from '../utils' ;
6
+ import type { Callback , MongoDBNamespace } from '../utils' ;
7
7
import type { WriteConcernOptions } from '../write_concern' ;
8
8
import { CollationOptions , CommandOperation , CommandOperationOptions } from './command' ;
9
9
import { Aspect , defineAspects , Hint } from './operation' ;
@@ -83,7 +83,7 @@ export class DeleteOperation extends CommandOperation<Document> {
83
83
}
84
84
85
85
const unacknowledgedWrite = this . writeConcern && this . writeConcern . w === 0 ;
86
- if ( unacknowledgedWrite || maxWireVersion ( server ) < 5 ) {
86
+ if ( unacknowledgedWrite ) {
87
87
if ( this . statements . find ( ( o : Document ) => o . hint ) ) {
88
88
callback ( new MongoCompatibilityError ( `Servers < 3.4 do not support hint on delete` ) ) ;
89
89
return ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type { Collection } from '../collection';
3
3
import { MongoCompatibilityError , MongoInvalidArgumentError , MongoServerError } from '../error' ;
4
4
import type { Server } from '../sdam/server' ;
5
5
import type { ClientSession } from '../sessions' ;
6
- import { Callback , hasAtomicOperators , maxWireVersion , MongoDBNamespace } from '../utils' ;
6
+ import { Callback , hasAtomicOperators , MongoDBNamespace } from '../utils' ;
7
7
import { CollationOptions , CommandOperation , CommandOperationOptions } from './command' ;
8
8
import { Aspect , defineAspects , Hint } from './operation' ;
9
9
@@ -108,7 +108,7 @@ export class UpdateOperation extends CommandOperation<Document> {
108
108
}
109
109
110
110
const unacknowledgedWrite = this . writeConcern && this . writeConcern . w === 0 ;
111
- if ( unacknowledgedWrite || maxWireVersion ( server ) < 5 ) {
111
+ if ( unacknowledgedWrite ) {
112
112
if ( this . statements . find ( ( o : Document ) => o . hint ) ) {
113
113
callback ( new MongoCompatibilityError ( `Servers < 3.4 do not support hint on update` ) ) ;
114
114
return ;
You can’t perform that action at this time.
0 commit comments