Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.4.13
-
None
Description
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.