-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: 5.0.0
-
Component/s: None
Use Case
Async/await syntax has certain performance benefits over manual promise manipulation it would be nice to obtain those gains where we can. One instance in our driver of being a promise only interface is withTransaction.
Unknowns
- How deep can the async await syntax go?
- (update: Feb 28, 2024) We have converted more of the internals of the driver, we should be able to completely convert the API to async/await
Acceptance Criteria
Implementation Requirements
- Change promise using transaction code to use async/await
- withTransaction
- attemptTransaction
- attemptTransactionCommit
- abortTransaction
- endTransaction
- Remove endTransactionAsync (endTransaction will take its place)
Testing Requirements
- Might be interesting to see if there's a measurable difference in performance but it is probably out weighed by actual operations of a transaction. Maybe stubbing the lower layers to just test the JS part of this.
Documentation Requirements
Follow Up Requirements
- fixes
-
NODE-5923 Unhandled errors not caught on transaction transition errors
- Blocked