mirror of https://github.com/tikv/client-java.git
fix retry with resolvedlocks info
Signed-off-by: ajian2002 <ajian020515@163.com>
This commit is contained in:
parent
1b5edcd8ab
commit
b516cb97d2
|
|
@ -298,7 +298,16 @@ public class RegionStoreClient extends AbstractRegionStoreClient {
|
|||
forWrite);
|
||||
BatchGetResponse resp =
|
||||
callWithRetry(backOffer, TikvGrpc.getKvBatchGetMethod(), request, handler);
|
||||
return handleBatchGetResponse(backOffer, resp, version);
|
||||
try {
|
||||
return handleBatchGetResponse(backOffer, resp, version);
|
||||
} catch (TiKVException e) {
|
||||
if ("locks not resolved, retry".equals(e.getMessage())) {
|
||||
backOffer.doBackOff(BackOffFunction.BackOffFuncType.BoTxnLock, e);
|
||||
return batchGet(backOffer, keys, version);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private List<KvPair> handleBatchGetResponse(
|
||||
|
|
|
|||
Loading…
Reference in New Issue