File tree 2 files changed +4
-11
lines changed
2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,8 @@ export class DeleteOperation extends CommandOperation<Document> {
93
93
const unacknowledgedWrite = this . writeConcern && this . writeConcern . w === 0 ;
94
94
if ( unacknowledgedWrite || maxWireVersion ( server ) < 5 ) {
95
95
if ( this . statements . find ( ( o : Document ) => o . hint ) ) {
96
- callback ( new MongoCompatibilityError ( `Servers < 3.4 do not support hint on delete` ) ) ;
96
+ // TODO(NODE-3541): fix error for hint with unacknowledged writes
97
+ callback ( new MongoCompatibilityError ( `hint is not supported with unacknowledged writes` ) ) ;
97
98
return ;
98
99
}
99
100
}
Original file line number Diff line number Diff line change @@ -125,16 +125,8 @@ export class UpdateOperation extends CommandOperation<Document> {
125
125
const unacknowledgedWrite = this . writeConcern && this . writeConcern . w === 0 ;
126
126
if ( unacknowledgedWrite || maxWireVersion ( server ) < 5 ) {
127
127
if ( this . statements . find ( ( o : Document ) => o . hint ) ) {
128
- if ( maxWireVersion ( server ) < 5 ) {
129
- callback ( new MongoCompatibilityError ( `Servers < 3.4 do not support hint on update` ) ) ;
130
- } else {
131
- // TODO: https://jira.mongodb.org/browse/NODE-3541
132
- callback (
133
- new MongoCompatibilityError (
134
- `This Node.js driver do not support hint together with unacknowledged writes`
135
- )
136
- ) ;
137
- }
128
+ // TODO(NODE-3541): fix error for hint with unacknowledged writes
129
+ callback ( new MongoCompatibilityError ( `hint is not supported with unacknowledged writes` ) ) ;
138
130
return ;
139
131
}
140
132
}
You can’t perform that action at this time.
0 commit comments