You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Bryan Beaudreault (Jira)" <ji...@apache.org> on 2022/07/16 21:23:00 UTC

[jira] [Reopened] (HBASE-27205) Fix tests that rely on EnvironmentEdgeManager in branch-2.4

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

Bryan Beaudreault reopened HBASE-27205:
---------------------------------------

It appears there's another instance of EnvironmentEdgeManager needed. I'll push a PR shortly. I ran the tests locally 26 times with this patch and they never failed. Of course that's on relatively recent mac, so hard to know if it will be the last thing.

> Fix tests that rely on EnvironmentEdgeManager in branch-2.4
> -----------------------------------------------------------
>
>                 Key: HBASE-27205
>                 URL: https://issues.apache.org/jira/browse/HBASE-27205
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.4.13
>            Reporter: Bryan Beaudreault
>            Assignee: Bryan Beaudreault
>            Priority: Minor
>              Labels: patch-available
>             Fix For: 2.4.14
>
>
> https://issues.apache.org/jira/browse/HBASE-25911 converted all System.currentTimeMillis() calls in master and branch-2 to use EnvironmentEdgeManager. For whatever reason, this was not backported to branch-2.4. 
> There exists tests TestAppendTimeRange and TestIncrementTimeRange which rely on EnvironmentEdge injection. These tests are consistently timing out due to logic in RSRpcServices.getRemainingRpcTimeout which subtracts "now" from call.getReceiveTime(). 
> In this case, the now calculation uses EnvironmentEdge, but the ServerCalls use System.currentTimeMillis(). This discrepancy causes the calculated timeout to be unexpectedly large, hanging the test.
> We have two options:
>  # Add EnvironmentEdgeManager in the narrowly necessary places to get this to work.
>  # Revert branch-2.4's getTimeLimit to use System.currentTimeMillis.
> I'm going to push a PR which does option 1, but I'm open to open 2 if that is desired instead.



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