File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,16 @@ export class UpdateOperation extends CommandOperation<Document> {
110
110
const unacknowledgedWrite = this . writeConcern && this . writeConcern . w === 0 ;
111
111
if ( unacknowledgedWrite ) {
112
112
if ( this . statements . find ( ( o : Document ) => o . hint ) ) {
113
- callback ( new MongoCompatibilityError ( `Servers < 3.4 do not support hint on update` ) ) ;
113
+ if ( maxWireVersion ( server ) < 5 ) {
114
+ callback ( new MongoCompatibilityError ( `Servers < 3.4 do not support hint on update` ) ) ;
115
+ } else {
116
+ // TODO: https://jira.mongodb.org/browse/NODE-3541
117
+ callback (
118
+ new MongoCompatibilityError (
119
+ `This Node.js driver do not support hint together with unacknowledged writes`
120
+ )
121
+ ) ;
122
+ }
114
123
return ;
115
124
}
116
125
}
You can’t perform that action at this time.
0 commit comments