Charles Connell created HBASE-29280:
---------------------------------------

             Summary: Bug in RawAsyncTableImpl#coprocessorServiceUntilComplete 
retry logic
                 Key: HBASE-29280
                 URL: https://issues.apache.org/jira/browse/HBASE-29280
             Project: HBase
          Issue Type: Bug
            Reporter: Charles Connell
            Assignee: Charles Connell


I noticed a bug that I introduced in HBASE-28770. I introduced the ability for 
coprocessor endpoints to send partial responses. When this happens, the client 
needs to send a new request to fetch remaining results, and may sleep before 
doing so. The logic for sleeping looks like:

{code:java}
          if (waitInterval.isZero()) {
            AsyncConnectionImpl.RETRY_TIMER.newTimeout(
              (timeout) -> coprocessorServiceUntilComplete(stubMaker, 
updatedCallable, callback,
                locateFinished, unfinishedRequest, region, span),
              waitInterval.toMillis(), TimeUnit.MILLISECONDS);
          } else {
            coprocessorServiceUntilComplete(stubMaker, updatedCallable, 
callback, locateFinished,
              unfinishedRequest, region, span);
          }
{code}

which has backwards logic. The first line should read
{code:java}
if (!waitInterval.isZero()) {}
{code}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to