We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c8ff33 commit 7acafe0Copy full SHA for 7acafe0
1 file changed
src/operations/update.ts
@@ -110,7 +110,16 @@ export class UpdateOperation extends CommandOperation<Document> {
110
const unacknowledgedWrite = this.writeConcern && this.writeConcern.w === 0;
111
if (unacknowledgedWrite) {
112
if (this.statements.find((o: Document) => o.hint)) {
113
- callback(new MongoCompatibilityError(`Servers < 3.4 do not support hint on update`));
+ 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
+ }
123
return;
124
}
125
0 commit comments