cherry pick #172 to release-3.1 (#175)

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

Co-authored-by: birdstorm <samuelwyf@hotmail.com>
This commit is contained in:
ti-srebot 2021-06-04 12:24:23 +08:00 committed by GitHub
parent 490b4a1e01
commit 01b391ff2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 deletions

View File

@ -123,9 +123,7 @@ public class KVErrorHandler<RespT> implements ErrorHandler<RespT> {
@Override
public boolean handleResponseError(BackOffer backOffer, RespT resp) {
if (resp == null) {
String msg =
String.format(
"Request Failed with unknown reason for region region [%s]", recv.getRegion());
String msg = String.format("Request Failed with unknown reason for [%s]", recv.getRegion());
logger.warn(msg);
return handleRequestError(backOffer, new GrpcException(msg));
}

View File

@ -56,7 +56,7 @@ public class Batch {
}
public BackOffer getBackOffer() {
return backOffer;
return ConcreteBackOffer.create(backOffer);
}
public TiRegion getRegion() {