Given transaction number 1 does not match any in-progress transactions #15091
Labels
help wanted
help
This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
Prerequisites
Mongoose version
^8.8.2
Node.js version
20.18.0
MongoDB version
^6.11.0
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
10.0.26100
Issue
Code
Summary of code
The transaction validates the input, checks event and slot availability, ensures there are seats, and creates booking records in the database. If any step fails, it rolls back; otherwise, it commits.
Booking Data Preparation:
Iterates over the data array in the payload, validating and mapping its properties (bookingFor and moreInfo) to prepare booking records for the database.
Error
When I save each document individually, the issue does not occur. Only occurs when I try do save multiple documents in an array of object format.
Here comes the funny thing. The error, it doesn't occur every time, sometimes there is error and sometimes there are no error. And the error differes each time if I keep hitting the code continuously.
Examples of the errors
The number keeps increasing. Some success some errors.
Why is it happening?
The text was updated successfully, but these errors were encountered: