Describe the bug
The current implementation of storage.Adapter.PerformTransaction does not incorporate retries, which results in potential for WriteConflict errors and possibly others.
To Reproduce
Steps to reproduce the behavior:
Send multiple simultaneous requests that perform DB writes in a transaction
See logged error message stating that a WriteConflict error occurred and the transaction should be retried
Expected behavior
Use mongo.Session.WithTransaction instead of mongo.Client.UseSession, as Mongo's implementation of WithTransaction implements retry logic internally.
Describe the bug The current implementation of
storage.Adapter.PerformTransaction
does not incorporate retries, which results in potential forWriteConflict
errors and possibly others.To Reproduce Steps to reproduce the behavior:
WriteConflict
error occurred and the transaction should be retriedExpected behavior Use
mongo.Session.WithTransaction
instead ofmongo.Client.UseSession
, as Mongo's implementation ofWithTransaction
implements retry logic internally.