hbase-issues 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-17431) Incorrect precheck condition in RoundRobinPool#get()
Date Fri, 06 Jan 2017 05:49:58 GMT
Ted Yu created HBASE-17431:

             Summary: Incorrect precheck condition in RoundRobinPool#get()
                 Key: HBASE-17431
                 URL: https://issues.apache.org/jira/browse/HBASE-17431
             Project: HBase
          Issue Type: Bug
            Reporter: Ted Yu
            Priority: Minor

Here is related code:
    public R get() {
      if (super.size() < maxSize) {
        return null;
      nextResource %= super.size();
Since super.size() is involved in modulo operation after the check, it seems the check should
compare against 0 instead of maxSize.

Looks like a copy-paste error from put() method.

This message was sent by Atlassian JIRA

View raw message