mirror of https://github.com/tikv/client-java.git
parent
e672c46dfe
commit
bf1eefacd3
|
|
@ -280,9 +280,16 @@ public class PDClient extends AbstractGRPCClient<PDBlockingStub, PDFutureStub>
|
|||
|
||||
@Override
|
||||
public Store getStore(BackOffer backOffer, long storeId) {
|
||||
return callWithRetry(
|
||||
backOffer, PDGrpc.getGetStoreMethod(), buildGetStoreReq(storeId), buildPDErrorHandler())
|
||||
.getStore();
|
||||
GetStoreResponse resp =
|
||||
callWithRetry(
|
||||
backOffer,
|
||||
PDGrpc.getGetStoreMethod(),
|
||||
buildGetStoreReq(storeId),
|
||||
buildPDErrorHandler());
|
||||
if (resp != null) {
|
||||
return resp.getStore();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class StoreHealthyChecker implements Runnable {
|
|||
private boolean checkStoreTombstone(TiStore store) {
|
||||
try {
|
||||
Metapb.Store newStore = pdClient.getStore(ConcreteBackOffer.newRawKVBackOff(), store.getId());
|
||||
if (newStore.getState() == Metapb.StoreState.Tombstone) {
|
||||
if (newStore != null && newStore.getState() == Metapb.StoreState.Tombstone) {
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue