Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential concurrent call when backoff #172

Merged
merged 1 commit into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class RegionException extends TiKVException {
private final Error regionErr;

public RegionException(Error regionErr) {
super("Region Exception occurred" + regionErr.getMessage());
super("Region Exception occurred " + regionErr.getMessage());
this.regionErr = regionErr;
}

Expand Down
4 changes: 1 addition & 3 deletions src/main/java/org/tikv/common/operation/KVErrorHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ private void resolveLock(BackOffer backOffer, Lock lock) {
@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));
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/tikv/common/util/Batch.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private Map<ByteString, ByteString> toMap(List<ByteString> keys, List<ByteString
}

public BackOffer getBackOffer() {
return backOffer;
return ConcreteBackOffer.create(backOffer);
}

public TiRegion getRegion() {
Expand Down