Skip to content

Commit

Permalink
HBASE-27676 Scan handlers in the RPC executor should match at least o…
Browse files Browse the repository at this point in the history
…ne scan queues
  • Loading branch information
sunhelly committed Mar 2, 2023
1 parent d2b0074 commit c2349db
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ public RWQueueRpcExecutor(final String name, final int handlerCount, final int m
int readQueues = calcNumReaders(this.numCallQueues, callqReadShare);
int readHandlers = Math.max(readQueues, calcNumReaders(handlerCount, callqReadShare));

int scanQueues = Math.max(0, (int) Math.floor(readQueues * callqScanShare));
int scanHandlers = Math.max(0, (int) Math.floor(readHandlers * callqScanShare));
int scanQueues =
scanHandlers > 0 ? Math.max(1, (int) Math.floor(readQueues * callqScanShare)) : 0;

if ((readQueues - scanQueues) > 0) {
if (scanQueues > 0) {
readQueues -= scanQueues;
readHandlers -= scanHandlers;
} else {
Expand Down

0 comments on commit c2349db

Please sign in to comment.