-
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-6060): set fire-and-forget protocol when writeConcern is w: 0 #4219
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aditi-khare-mongoDB
changed the title
initial commit
feat(NODE-6060): Set fire-and-forget protocol when writeConcern is w: 0
Sep 3, 2024
aditi-khare-mongoDB
changed the title
feat(NODE-6060): Set fire-and-forget protocol when writeConcern is w: 0
feat(NODE-6060): set fire-and-forget protocol when writeConcern is w: 0
Sep 5, 2024
lint fix lont fix 2
aditi-khare-mongoDB
force-pushed
the
NODE-6060/fire-and-forget
branch
from
September 6, 2024 20:57
fb78f1d
to
ebd4b44
Compare
aditi-khare-mongoDB
force-pushed
the
NODE-6060/fire-and-forget
branch
from
September 6, 2024 21:22
9f58d35
to
d892ccc
Compare
durran
added
the
Primary Review
In Review with primary reviewer, not yet ready for team's eyes
label
Sep 10, 2024
durran
requested changes
Sep 11, 2024
nbbeeken
reviewed
Sep 11, 2024
nbbeeken
requested changes
Sep 13, 2024
durran
previously approved these changes
Sep 16, 2024
durran
added
Team Review
Needs review from team
and removed
Primary Review
In Review with primary reviewer, not yet ready for team's eyes
labels
Sep 16, 2024
aditi-khare-mongoDB
force-pushed
the
NODE-6060/fire-and-forget
branch
from
September 16, 2024 14:55
8aa770a
to
6104c57
Compare
nbbeeken
approved these changes
Sep 16, 2024
durran
approved these changes
Sep 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When
writeConcern.w = 0
is set on an operation that's run through OP_MSG, the driver will set moreToCome on the request so that the server will not send a response.What is changing?
writeConcern.w === 0
, the driverCommandSucceededEvent.reply
to{ ok: 1 }
regardless of server replyIs there new documentation needed for these changes?
No, none other than the TSDoc changes.
What is the motivation for this change?
Support spec-defined fire-and-forget protocol.
Release Highlight
Write Operations with
WriteConcern.w
set to0
trigger unacknowledged write protocolWhen
WriteConcern.w
is set to0
on a write operation, either through operation options or the client settings, writes will be unacknowledged by the server. This means the server will not send a response after the request is sent and therefore, the return value from the operation will not contain any information from the server, including whether the server has processed the request yet.In addition, when command monitoring is enabled, the
reply
field of aCommandSucceededEvent
of an unacknowledged write will always be{ ok: 1 }
.Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript