client-java icon indicating copy to clipboard operation
client-java copied to clipboard

Prewrite PrimaryKey unnecessary retry

Open shiyuhang0 opened this issue 3 years ago • 1 comments

Bug Report

1. Describe the bug

Prewrite PrimaryKey will retry for the retryableException. The following code shows the definition of retryableException.

private boolean retryableException(Exception e) {
    return e instanceof TiClientInternalException
        || e instanceof KeyException
        || e instanceof RegionException
        || e instanceof StatusRuntimeException;
  }

Consider this scenario: Prewrite PrimaryKey fail because of the KeyException-WriteConflict(start_ts<commit_ts). Then It will fail no matter how many times it is retried, because the start_ts is always less than commit_ts

Here are my questions:

  1. Are there some exceptions that don't have to be retried.
  2. Whether to use new request parameters when retrying, such as new start_ts.

shiyuhang0 avatar Mar 29 '22 09:03 shiyuhang0

This issue is stale because it has been open 30 days with no activity.

github-actions[bot] avatar Apr 29 '22 00:04 github-actions[bot]