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 5424E200B2B for ; Mon, 13 Jun 2016 16:42:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 52D77160A3C; Mon, 13 Jun 2016 14:42:23 +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 9C3FF160A1A for ; Mon, 13 Jun 2016 16:42:22 +0200 (CEST) Received: (qmail 71316 invoked by uid 500); 13 Jun 2016 14:42:21 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 71233 invoked by uid 99); 13 Jun 2016 14:42:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jun 2016 14:42:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 41FDA2C1F60 for ; Mon, 13 Jun 2016 14:42:21 +0000 (UTC) Date: Mon, 13 Jun 2016 14:42:21 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Issue Comment Deleted] (JCS-156) BlockDiskCache is limited to 2GB. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 13 Jun 2016 14:42:23 -0000 [ https://issues.apache.org/jira/browse/JCS-156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebb updated JCS-156: --------------------- Comment: was deleted (was: I agree - there are lots of places where it is assumed that a block number is an int. Changing this would break BC unless new methods were added, and anyway that would not stop existing code from breaking. Seems to me the simplest fix (short of a complete redesign) is to detect the problem earlier and throw a better Exception.) > BlockDiskCache is limited to 2GB. > --------------------------------- > > Key: JCS-156 > URL: https://issues.apache.org/jira/browse/JCS-156 > Project: Commons JCS > Issue Type: Bug > Components: Composite Cache > Affects Versions: jcs-2.0-beta-1 > Reporter: Alexander Malyshev > Assignee: Thomas Vandahl > Attachments: jcs.patch > > > There is a bug in BlockDiskCache which makes it limited to 2GB in size. If I try to write more, I'm getting the following exception: > Exception in thread "CacheEventQueue.QProcessor-sliderCache" java.lang.IllegalArgumentException: Negative position > at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:754) > at org.apache.commons.jcs.auxiliary.disk.block.BlockDisk.write(BlockDisk.java:216) > at org.apache.commons.jcs.auxiliary.disk.block.BlockDiskCache.processUpdate(BlockDiskCache.java:394) > at org.apache.commons.jcs.auxiliary.AbstractAuxiliaryCacheEventLogging.updateWithEventLogging(AbstractAuxiliaryCacheEventLogging.java:65) > at org.apache.commons.jcs.auxiliary.disk.AbstractDiskCache.doUpdate(AbstractDiskCache.java:804) > at org.apache.commons.jcs.auxiliary.disk.AbstractDiskCache$MyCacheListener.handlePut(AbstractDiskCache.java:662) > at org.apache.commons.jcs.engine.AbstractCacheEventQueue$PutEvent.doRun(AbstractCacheEventQueue.java:350) > at org.apache.commons.jcs.engine.AbstractCacheEventQueue$AbstractCacheEvent.run(AbstractCacheEventQueue.java:269) > at org.apache.commons.jcs.engine.CacheEventQueue$QProcessor.run(CacheEventQueue.java:304) > The reason is that method calculateByteOffsetForBlock in BlockDisk class returns int instead of long. -- This message was sent by Atlassian JIRA (v6.3.4#6332)