Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 922FD117E1 for ; Tue, 20 May 2014 10:02:38 +0000 (UTC) Received: (qmail 43950 invoked by uid 500); 20 May 2014 10:02:38 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 43908 invoked by uid 500); 20 May 2014 10:02:38 -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 43899 invoked by uid 99); 20 May 2014 10:02:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2014 10:02:38 +0000 Date: Tue, 20 May 2014 10:02:38 +0000 (UTC) From: "Honghua Feng (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-11200) AsyncWriter of FSHLog might throw ArrayIndexOutOfBoundsException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-11200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Honghua Feng updated HBASE-11200: --------------------------------- Fix Version/s: 0.98.4 0.98.3 > AsyncWriter of FSHLog might throw ArrayIndexOutOfBoundsException > ---------------------------------------------------------------- > > Key: HBASE-11200 > URL: https://issues.apache.org/jira/browse/HBASE-11200 > Project: HBase > Issue Type: Bug > Components: wal > Affects Versions: 0.98.2 > Reporter: cuijianwei > Assignee: cuijianwei > Priority: Minor > Fix For: 0.98.3, 0.98.4 > > Attachments: HBASE-11200-0.98.patch > > > AsyncWriter of FSHLog might throw ArrayIndexOutOfBoundsException because of the following code in AsyncWriter#run(): > {code} > } > } > if (!hasIdleSyncer) { > int idx = (int)this.lastWrittenTxid % asyncSyncers.length; > asyncSyncers[idx].setWrittenTxid(this.lastWrittenTxid); > } > } > {code} > In obove code, "this.lastWrittenTxid % asyncSyncers.length" might become negative when this.lastWrittenTxid is bigger than Interger.MAX_VALUE where this.lastWrittenTxid is a long. The attachment gives a quick fix. -- This message was sent by Atlassian JIRA (v6.2#6252)