【问题标题】:My application sees frequent TransactionRetryWithProtoRefreshError errors in CockroachDB?My application sees frequent TransactionRetryWithProtoRefreshError errors in CockroachDB?
【发布时间】:2022-12-02 04:43:49
【问题描述】:

When executing a large/complex concurrent transactions in my application I frequently run into TransactionRetryWithProtoRefreshError errors.

If I reduce concurrency the frequency of these errors reduces.

【问题讨论】:

    标签: cockroachdb


    【解决方案1】:

    CockroachDB has a serializable isolation level, so it may be necessary to break up statements into multiple transactions or have the application retry operations. See: https://www.cockroachlabs.com/docs/stable/transaction-retry-error-reference.html#retry_serializable, which describes how applications should handle these errors.

    Cockroach internally at the server side will also retry your transaction if possible, for example, if no result sets are returned to the client. But it may not be possible in all cases, and some design considerations have to be taken on the application side

    【讨论】:

      猜你喜欢
      • 2013-10-19
      • 2017-09-12
      • 1970-01-01
      • 2022-01-13
      • 2022-11-09
      • 1970-01-01
      • 2022-12-19
      • 2022-12-02
      • 2022-12-27
      相关资源
      最近更新 更多