mirror of https://github.com/tikv/client-java.git
Signed-off-by: ti-srebot <ti-srebot@pingcap.com> Co-authored-by: birdstorm <samuelwyf@hotmail.com>
This commit is contained in:
parent
490b4a1e01
commit
01b391ff2f
|
|
@ -24,7 +24,7 @@ public class RegionException extends TiKVException {
|
||||||
private final Error regionErr;
|
private final Error regionErr;
|
||||||
|
|
||||||
public RegionException(Error regionErr) {
|
public RegionException(Error regionErr) {
|
||||||
super("Region Exception occurred" + regionErr.getMessage());
|
super("Region Exception occurred " + regionErr.getMessage());
|
||||||
this.regionErr = regionErr;
|
this.regionErr = regionErr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,9 +123,7 @@ public class KVErrorHandler<RespT> implements ErrorHandler<RespT> {
|
||||||
@Override
|
@Override
|
||||||
public boolean handleResponseError(BackOffer backOffer, RespT resp) {
|
public boolean handleResponseError(BackOffer backOffer, RespT resp) {
|
||||||
if (resp == null) {
|
if (resp == null) {
|
||||||
String msg =
|
String msg = String.format("Request Failed with unknown reason for [%s]", recv.getRegion());
|
||||||
String.format(
|
|
||||||
"Request Failed with unknown reason for region region [%s]", recv.getRegion());
|
|
||||||
logger.warn(msg);
|
logger.warn(msg);
|
||||||
return handleRequestError(backOffer, new GrpcException(msg));
|
return handleRequestError(backOffer, new GrpcException(msg));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ public class Batch {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BackOffer getBackOffer() {
|
public BackOffer getBackOffer() {
|
||||||
return backOffer;
|
return ConcreteBackOffer.create(backOffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TiRegion getRegion() {
|
public TiRegion getRegion() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue