Closed rafael-magno closed 4 months ago
AWS DocumentDB is a separate implementation from the MongoDB server. DocumentDB has a number of compatibility differences as compared to MongoDB. If your issue isn’t reproducible with an actual MongoDB deployment, there isn’t much we can do to investigate. You could try using a free tier MongoDB Atlas cluster to compare behaviour. For support using DocumentDB I suggest posting on the AWS Forums.
If I use DB::transaction in AWS DocumentDB this error is thrown: "Feature not supported: Causal consistency".
The way I resolved this was by duplicating the ManagesTransactions trait and making the modification to the getSessionOrCreate method, adding a option on startSession method. As shown below:
To resolve it definitively, I suggest passing one more parameter ($sessionOptions for example), in the ManagesTransactions::getSessionOrCreate and ManagesTransactions::transaction methods