You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Charles Connell (Jira)" <ji...@apache.org> on 2025/04/30 17:58:00 UTC

[jira] [Updated] (HBASE-29280) Bug in RawAsyncTableImpl#coprocessorServiceUntilComplete retry logic

     [ https://issues.apache.org/jira/browse/HBASE-29280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Charles Connell updated HBASE-29280:
------------------------------------
    Description: 
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}

  was:
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}



> 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
>            Priority: Minor
>
> 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)