-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(NODE-4756)!: ok 1 with write concern failure event changes #3525
Conversation
040ef39
to
c523c1d
Compare
Lint failure unrelated to this PR but addressed in #3524 |
a52b422
to
de23ac1
Compare
@@ -500,7 +500,8 @@ function makeOperationHandler( | |||
): Callback { | |||
const session = options?.session; | |||
return function handleOperationResult(error, result) { | |||
if (result != null) { | |||
// We should not swallow an error if it is present. | |||
if (error == null && result != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are not monitoring commands the operation description's callback doesn't get wrapped and thus both an error and result are present here.
test/integration/retryable-writes/retryable_writes.spec.prose.test.ts
Outdated
Show resolved
Hide resolved
test/integration/retryable-writes/retryable_writes.spec.prose.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just got a lint error, I thought it was the one that was on main for a bit, but that's been fixed
Ah that pesky import. |
note: red CI is unrelated to changes here, I've filed a ticket about the new failures and we know about the FLE CI script issue |
Description
For commands with write concern errors but an
{ ok: 1 }
in the command reply, the driver now emits a command succeeded event.What is changing?
CommandSucceededEvent
when a reply has{ ok: 1 }
with write concern errors.Specs PR: mongodb/specifications#1367
Is there new documentation needed for these changes?
None
What is the motivation for this change?
NODE-4756/DRIVERS-2468
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript