hadoop
hadoop copied to clipboard
HDFS-17476. fix: False positive "Observer Node is too far behind" due to long overflow.
Description of PR
seeAlse : https://issues.apache.org/jira/browse/HDFS-17476 In the code GlobalStateIdContext#receiveRequestState(), if clientStateId is a small negative number, clientStateId-serverStateId may be greater than
(ESTIMATED_TRANSACTIONS_PER_SECOND due to overflow * TimeUnit.MILLISECONDS.toSeconds(clientWaitTime) * ESTIMATED_SERVER_TIME_MULTIPLIER),
resulting in false positives that Observer Node is too far behind.
How was this patch tested?
hi, I'm not sure whether I need to add a new UT. I think the existing UT is ok.
For code changes:
- [x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
- [ ] If applicable, have you updated the
LICENSE
,LICENSE-binary
,NOTICE-binary
files?