Skip to content

Commit

Permalink
Revert "HBASE-22715 All scan requests should be handled by scan handl…
Browse files Browse the repository at this point in the history
…er threads in RWQueueRpcExecutor (#393)"

This reverts commit 55bd5ec.

Incorrect application to branch-1.3. HBASE-22715 is relevant only where HBASE-17508
was committed.
  • Loading branch information
apurtell committed Jul 24, 2019
1 parent 55bd5ec commit d5db65f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,12 @@ private boolean isWriteRequest(final RequestHeader header, final Message param)
}

private boolean isScanRequest(final RequestHeader header, final Message param) {
return param instanceof ScanRequest;
if (param instanceof ScanRequest) {
// The first scan request will be executed as a "short read"
ScanRequest request = (ScanRequest)param;
return request.hasScannerId();
}
return false;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public void testScanQueues() throws Exception {

CallRunner scanCallTask = mock(CallRunner.class);
RpcServer.Call scanCall = mock(RpcServer.Call.class);
scanCall.param = ScanRequest.newBuilder().build();
scanCall.param = ScanRequest.newBuilder().setScannerId(1).build();
RequestHeader scanHead = RequestHeader.newBuilder().setMethodName("scan").build();
when(scanCallTask.getCall()).thenReturn(scanCall);
when(scanCall.getHeader()).thenReturn(scanHead);
Expand Down

0 comments on commit d5db65f

Please sign in to comment.