-
Type: Task
-
Resolution: Won't Do
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Context
GODRIVER-2997 describes an issue where if a user passes a cancelable context into WithTransaction and cancels mid-transaction, then the transaction still completes. It is noted in in the documentation for WithTransaction that we do not honor cancelations:
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.
The underlying method that causes this issue is CommitTransaction. Perhaps the documentation for this method should include the context limitations.
Definition of done
The following questions should be answered and documented:
1. Can you cancel a context while committing a transaction? If yes, what is the difference between doing that and using WithTransaction, which is a convenience wrapper for CommitTransaction.
2. If you can't use the functionality of a context on CommitTransaction and WithTransaction, what is the purpose of passing a context to these methods?
What must be done to consider the task complete?
Pitfalls
What should the implementer watch out for? What are the risks?
- related to
-
GODRIVER-2997 WithTransaction completes despite a context cancelation
- Closed