-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: 5.8.1, 6.1.0
-
Component/s: Transactions
What problem are you facing?
I hit this issue in a test where I attempt to insert multiple copies of the same document in a single transaction. I can see that one of the insert operations fails with a DuplicateKeyError, but it seems that when the transaction is run using the driver's `withTransaction` wrapper, it keeps retrying the transaction even though the error shouldn't really be considered "transient" (ie. this operation will always fail no matter what)
What driver and relevant dependency versions are you using?
Primarily tested on driver version 5.8.1 using Mongoose with version 7.5.0, but I also did a quick test on 6.1.0 to see if the issue still presents itself.
Steps to reproduce?
Use the `withTransaction` wrapper and perform two identical write operations on the same collection which include the same _id (or another duplicate piece of information which has a unique index, this is the case I'm hitting)
- depends on
-
DRIVERS-2584 Infinite loop in generic transactional provider due to dup keys
- Implementing