hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-8651) Result of integer multiplication cast to long in HRegionFileSystem#sleepBeforeRetry()
Date Wed, 29 May 2013 23:30:23 GMT
Ted Yu created HBASE-8651:
-----------------------------

             Summary: Result of integer multiplication cast to long in HRegionFileSystem#sleepBeforeRetry()
                 Key: HBASE-8651
                 URL: https://issues.apache.org/jira/browse/HBASE-8651
             Project: HBase
          Issue Type: Bug
            Reporter: Ted Yu
            Priority: Minor


{code}
    Threads.sleep(baseSleepBeforeRetries * sleepMultiplier);
{code}
Both baseSleepBeforeRetries and sleepMultiplier are integers. Without proper casting, their
product may be negative.
Here is an example:
{code}
  static int i = Integer.MAX_VALUE-1;
  static long j = i * 2;
{code}
value of j above is -4 while 4294967292 was the expected value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message