Skip to content

PYTHON-1894: Client-side errors in in-progress transactions must not change transaction state#2857

Open
sophiayangDB wants to merge 11 commits into
mongodb:masterfrom
sophiayangDB:PYTHON-1894
Open

PYTHON-1894: Client-side errors in in-progress transactions must not change transaction state#2857
sophiayangDB wants to merge 11 commits into
mongodb:masterfrom
sophiayangDB:PYTHON-1894

Conversation

@sophiayangDB

@sophiayangDB sophiayangDB commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

PYTHON-1894

Changes in this PR

Transactions are only advanced from STARTING -> IN_PROGRESS after the first operation reaches the server response stage. This means that client-side errors do not advance state.

Test Plan

Removed the temporary unified test skips and expected failures for this case.

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)?
  • Is there test coverage?
  • Is any followup work tracked in a JIRA ticket? If so, add link(s).

Checklist for Reviewer

  • Does the title of the PR reference a JIRA Ticket?
  • Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
  • Is all relevant documentation (README or docstring) updated?

@codecov-commenter

codecov-commenter commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pymongo/asynchronous/client_session.py 83.33% 0 Missing and 1 partial ⚠️
pymongo/synchronous/client_session.py 83.33% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@sophiayangDB sophiayangDB marked this pull request as ready for review June 9, 2026 13:53
@sophiayangDB sophiayangDB requested a review from a team as a code owner June 9, 2026 13:53
@sophiayangDB sophiayangDB requested review from sleepyStick and removed request for sleepyStick June 9, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants