Skip to content
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

fix(NODE-6436): only force majority write concern on commitTransaction retry #4284

Merged
merged 6 commits into from
Oct 17, 2024

Conversation

W-A-James
Copy link
Contributor

@W-A-James W-A-James commented Oct 17, 2024

Description

What is changing?

Ensure that commitTransaction only overrides the write concern when the commitTransaction call is retried (both with builtin retry mechanism and user-initiated retry).

Is there new documentation needed for these changes?

No

What is the motivation for this change?

Needed by NODE-3914

Release Highlight

ClientSession.commitTransaction() no longer unconditionally overrides write concern

Prior to this change, ClientSession.commitTransaction() would always override any previously configured writeConcern on the initial attempt. This overriding behaviour now only applies to internal and user-initiated retries of ClientSession.commitTransaction() for a given transaction.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@W-A-James W-A-James marked this pull request as ready for review October 17, 2024 16:03
@durran durran self-assigned this Oct 17, 2024
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Oct 17, 2024
test/integration/transactions/transactions.test.ts Outdated Show resolved Hide resolved
src/sessions.ts Show resolved Hide resolved
@durran 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 Oct 17, 2024
@durran durran merged commit a7d1d43 into main Oct 17, 2024
26 of 28 checks passed
@durran durran deleted the NODE-6436 branch October 17, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants