File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 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';
33import { MongoCompatibilityError , MongoServerError } from '../error' ;
44import type { Server } from '../sdam/server' ;
55import type { ClientSession } from '../sessions' ;
6- import { Callback , maxWireVersion , MongoDBNamespace } from '../utils' ;
6+ import type { Callback , MongoDBNamespace } from '../utils' ;
77import type { WriteConcernOptions } from '../write_concern' ;
88import { CollationOptions , CommandOperation , CommandOperationOptions } from './command' ;
99import { Aspect , defineAspects , Hint } from './operation' ;
@@ -83,7 +83,7 @@ export class DeleteOperation extends CommandOperation<Document> {
8383 }
8484
8585 const unacknowledgedWrite = this . writeConcern && this . writeConcern . w === 0 ;
86- if ( unacknowledgedWrite || maxWireVersion ( server ) < 5 ) {
86+ if ( unacknowledgedWrite ) {
8787 if ( this . statements . find ( ( o : Document ) => o . hint ) ) {
8888 callback ( new MongoCompatibilityError ( `Servers < 3.4 do not support hint on delete` ) ) ;
8989 return ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type { Collection } from '../collection';
33import { MongoCompatibilityError , MongoInvalidArgumentError , MongoServerError } from '../error' ;
44import type { Server } from '../sdam/server' ;
55import type { ClientSession } from '../sessions' ;
6- import { Callback , hasAtomicOperators , maxWireVersion , MongoDBNamespace } from '../utils' ;
6+ import { Callback , hasAtomicOperators , MongoDBNamespace } from '../utils' ;
77import { CollationOptions , CommandOperation , CommandOperationOptions } from './command' ;
88import { Aspect , defineAspects , Hint } from './operation' ;
99
@@ -108,7 +108,7 @@ export class UpdateOperation extends CommandOperation<Document> {
108108 }
109109
110110 const unacknowledgedWrite = this . writeConcern && this . writeConcern . w === 0 ;
111- if ( unacknowledgedWrite || maxWireVersion ( server ) < 5 ) {
111+ if ( unacknowledgedWrite ) {
112112 if ( this . statements . find ( ( o : Document ) => o . hint ) ) {
113113 callback ( new MongoCompatibilityError ( `Servers < 3.4 do not support hint on update` ) ) ;
114114 return ;
You can’t perform that action at this time.
0 commit comments