- 云数据事务报错:ResourceUnavailable.TransactionConflict?
[图片] "document.update:fail [ResourceUnavailable.TransactionConflict] Transaction is conflict, maybe resource operated by others. Please check your request, but if the problem persists, contact us.; at document.update api; " 云数据库的一个简单事务处理,代码如下: const cmd = db.command; const updtranscation = await db.startTransaction(); res = await updtranscation.collection('xinfo').doc(_id).update({ data: info }); if(info.total_pay>0){ res = await updtranscation.collection("xaction").doc(info._id).update({ data:{ total_pay:cmd.inc(info.total_pay) } }); } updtranscation.commit();
2020-02-15 - 小程序云开发"errCode":-501001?
当云函数中的事务同时处理多个请求(测试时是两个)时频繁包以下错误? "error":{"errCode":-501001,"errMsg":"[ResourceUnavailable.TransactionConflict] Transaction is conflict, maybe resource operated by others. Please check your request, but if the problem persists, contact us.; "}}
2020-06-22