client-java
client-java copied to clipboard
Prewrite PrimaryKey unnecessary retry
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:
- Are there some exceptions that don't have to be retried.
- Whether to use new request parameters when retrying, such as new start_ts.
This issue is stale because it has been open 30 days with no activity.