how to solve this transaction error in mlab? [MongoError: Transaction numbers are … support document-level locking]

后端 未结 3 2207
北荒
北荒 2021-02-19 10:35

I\'m trying to do a simple transaction using mongoose. It worked totally fine on MongoDB Atlas, but in mlab I got such an error: Mon

3条回答
  •  闹比i
    闹比i (楼主)
    2021-02-19 11:02

    This worked for me by adding retryWrites=false ;

    Current URL

     mongodb://:@ds0145508.mlab.com:11508/testdb
    

    New URL

    mongodb://:@ds0145508.mlab.com:11508/testdb?retryWrites=false 
    

提交回复
热议问题