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

GODRIVER-2997 Prevent cancelable context in txn commit loop #1416

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

prestonvasquez
Copy link
Collaborator

@prestonvasquez prestonvasquez commented Oct 6, 2023

GODRIVER-2997

Summary

Use a background context when committing a transaction.

Background & Motivation

The Go Driver documentation for Session.WithTransaction notes that you should not use the method with a cancelable context:

Because this method must succeed to ensure that server-side resources are properly cleaned up, context deadlines and cancellations will not be respected during this call.

Therefore, we should not honor user-defined contexts in the commit loop.

Copy link
Collaborator

@qingyang-hu qingyang-hu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@prestonvasquez prestonvasquez merged commit 757e2a7 into mongodb:v1 Oct 9, 2023
34 of 38 checks passed
@prestonvasquez prestonvasquez deleted the GODRIVER-2997 branch October 9, 2023 16:47
blink1073 pushed a commit to blink1073/mongo-go-driver that referenced this pull request Oct 10, 2023
rukumar333 pushed a commit to mongodb-forks/mongo-go-driver that referenced this pull request Oct 13, 2023
rukumar333 added a commit to mongodb-forks/mongo-go-driver that referenced this pull request Oct 13, 2023
dpish pushed a commit to mongodb-forks/mongo-go-driver that referenced this pull request Jan 23, 2024
dpish pushed a commit to mongodb-forks/mongo-go-driver that referenced this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants