开发者

Google App Engine - What exception does Transaction.commit() throw when there is a concurrency problem?

What exception does com.google.appengine.api.datastore.Transaction.commit() throw when there is a concurre开发者_如何学Goncy problem?

I want to retry if there is a concurrency issue, but I don't know what exception to catch.


As per the docs, it raises a TransactionFailedError. Retrying is a bad idea, though: The error gets thrown when there's too much contention, and retrying will simply increase the contention. If you want to change the number of retries, use run_in_transaction_custom_retries, documented here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜