HBASE-14156 Fix test failure in TestOpenTableInCoprocessor.
This commit is contained in:
parent
dad4cad30e
commit
ac08b992c5
|
@ -658,7 +658,11 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
|
||||||
Result r = null;
|
Result r = null;
|
||||||
if (action.hasGet()) {
|
if (action.hasGet()) {
|
||||||
Get get = ProtobufUtil.toGet(action.getGet());
|
Get get = ProtobufUtil.toGet(action.getGet());
|
||||||
r = get(get, ((HRegion) region), closeCallBack, context);
|
if (context != null) {
|
||||||
|
r = get(get, ((HRegion) region), closeCallBack, context);
|
||||||
|
} else {
|
||||||
|
r = region.get(get);
|
||||||
|
}
|
||||||
} else if (action.hasServiceCall()) {
|
} else if (action.hasServiceCall()) {
|
||||||
resultOrExceptionBuilder = ResultOrException.newBuilder();
|
resultOrExceptionBuilder = ResultOrException.newBuilder();
|
||||||
try {
|
try {
|
||||||
|
@ -2078,7 +2082,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
|
||||||
RegionActionResult.Builder regionActionResultBuilder = RegionActionResult.newBuilder();
|
RegionActionResult.Builder regionActionResultBuilder = RegionActionResult.newBuilder();
|
||||||
Boolean processed = null;
|
Boolean processed = null;
|
||||||
RegionScannersCloseCallBack closeCallBack = null;
|
RegionScannersCloseCallBack closeCallBack = null;
|
||||||
RpcCallContext context = null;
|
RpcCallContext context = RpcServer.getCurrentCall();
|
||||||
for (RegionAction regionAction : request.getRegionActionList()) {
|
for (RegionAction regionAction : request.getRegionActionList()) {
|
||||||
this.requestCount.add(regionAction.getActionCount());
|
this.requestCount.add(regionAction.getActionCount());
|
||||||
OperationQuota quota;
|
OperationQuota quota;
|
||||||
|
@ -2125,12 +2129,11 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// doNonAtomicRegionMutation manages the exception internally
|
// doNonAtomicRegionMutation manages the exception internally
|
||||||
if (closeCallBack == null) {
|
if (context != null && closeCallBack == null) {
|
||||||
// An RpcCallBack that creates a list of scanners that needs to perform callBack
|
// An RpcCallBack that creates a list of scanners that needs to perform callBack
|
||||||
// operation on completion of multiGets.
|
// operation on completion of multiGets.
|
||||||
// Set this only once
|
// Set this only once
|
||||||
closeCallBack = new RegionScannersCloseCallBack();
|
closeCallBack = new RegionScannersCloseCallBack();
|
||||||
context = RpcServer.getCurrentCall();
|
|
||||||
context.setCallBack(closeCallBack);
|
context.setCallBack(closeCallBack);
|
||||||
}
|
}
|
||||||
cellsToReturn = doNonAtomicRegionMutation(region, quota, regionAction, cellScanner,
|
cellsToReturn = doNonAtomicRegionMutation(region, quota, regionAction, cellScanner,
|
||||||
|
|
Loading…
Reference in New Issue