You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2017/01/10 14:16:58 UTC
[jira] [Comment Edited] (HBASE-17431) Incorrect precheck condition
in RoundRobinPool#get()
[ https://issues.apache.org/jira/browse/HBASE-17431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15813753#comment-15813753 ]
Ted Yu edited comment on HBASE-17431 at 1/10/17 2:15 PM:
---------------------------------------------------------
Upon further look, this is by design.
was (Author: yuzhihong@gmail.com):
Jan:
More investigation is needed.
Let me know if you need help.
> 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
> Attachments: HBASE-17431.master.001.patch, HBASE-17431.master.002.patch
>
>
> Here is related code:
> {code}
> public R get() {
> if (super.size() < maxSize) {
> return null;
> }
> nextResource %= super.size();
> {code}
> 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
(v6.3.4#6332)