[ 
https://issues.apache.org/jira/browse/HBASE-27048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17566893#comment-17566893
 ] 

Bryan Beaudreault commented on HBASE-27048:
-------------------------------------------

Ok I have a patch which adds EnvironmentEdgeManager in the necessary places to 
get this to work. Also, I just realized why this snuck by:

In my original [master 
PR|https://github.com/apache/hbase/commit/8fcb94ae8a69db7c9288be5f109d6f44424c3c93#diff-e4052cd5a1f1c93375e3fbc931dc4df220deebc78c0d53fd2435b47fd04cd807L3269],
 I saw the comment:
{code:java}
      // XXX: Can not use EnvironmentEdge here because TestIncrementTimeRange 
use a
      // ManualEnvironmentEdge. Consider using System.nanoTime instead.
      return EnvironmentEdgeManager.currentTime() + timeLimitDelta;{code}
But that was confusing because the code did in fact use EnvironmentEdgeManager, 
so I removed the comment.

When I did the branch-2 backport, the same was true. When I did the branch-2.4 
backport, I didn't realize that actually the comment did apply there because 
that branch hadn't had all System.currentTimeMillis() calls converted to 
EnvironmentEdgeManager like master/branch-2 did.

So another alternative here would be to revert to using 
System.currentTimeMillis() in this code block for branch-2.4. Let's discuss 
that in https://issues.apache.org/jira/browse/HBASE-27205

> Server side scanner time limit should account for time in queue
> ---------------------------------------------------------------
>
>                 Key: HBASE-27048
>                 URL: https://issues.apache.org/jira/browse/HBASE-27048
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Bryan Beaudreault
>            Assignee: Bryan Beaudreault
>            Priority: Major
>             Fix For: 2.5.0, 3.0.0-alpha-4, 2.4.14
>
>
> When a scan request comes in with a timeout specified and heartbeats/partials 
> allowed, we calculate a time limit for running the scan to be half of that 
> timeout. The idea is to return before the timeout expires.
> The calculation of that time limit is "now + timeout / 2", where now is the 
> point at which the scan is starting to run. What's missed here is the scan 
> may have spent upwards of a few seconds in the IPC queue before being 
> serviced. In this case, the time limit may extend beyond the timeout of the 
> request and the server will not return in time.
> We should calculate the time limit from ServerCall.getReceiveTime instead to 
> avoid these timeouts.



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

Reply via email to