Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 76C64200C04 for ; Tue, 10 Jan 2017 04:43:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 756F4160B3E; Tue, 10 Jan 2017 03:43:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C4CA5160B4C for ; Tue, 10 Jan 2017 04:42:59 +0100 (CET) Received: (qmail 23016 invoked by uid 500); 10 Jan 2017 03:42:58 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 22925 invoked by uid 99); 10 Jan 2017 03:42:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2017 03:42:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B09F12C2A68 for ; Tue, 10 Jan 2017 03:42:58 +0000 (UTC) Date: Tue, 10 Jan 2017 03:42:58 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-17431) Incorrect precheck condition in RoundRobinPool#get() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 10 Jan 2017 03:43:00 -0000 [ https://issues.apache.org/jira/browse/HBASE-17431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15813753#comment-15813753 ] Ted Yu commented on HBASE-17431: -------------------------------- 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 > Assignee: Jan Hentschel > 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)