commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] [Issue Comment Deleted] (JCS-156) BlockDiskCache is limited to 2GB.
Date Mon, 13 Jun 2016 14:42:21 GMT


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:
>             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
> 	at org.apache.commons.jcs.auxiliary.disk.block.BlockDisk.write(
> 	at org.apache.commons.jcs.auxiliary.disk.block.BlockDiskCache.processUpdate(
> 	at org.apache.commons.jcs.auxiliary.AbstractAuxiliaryCacheEventLogging.updateWithEventLogging(
> 	at org.apache.commons.jcs.auxiliary.disk.AbstractDiskCache.doUpdate(
> 	at org.apache.commons.jcs.auxiliary.disk.AbstractDiskCache$MyCacheListener.handlePut(
> 	at org.apache.commons.jcs.engine.AbstractCacheEventQueue$PutEvent.doRun(
> 	at org.apache.commons.jcs.engine.AbstractCacheEventQueue$
> 	at org.apache.commons.jcs.engine.CacheEventQueue$
> The reason is that method calculateByteOffsetForBlock in BlockDisk class returns int
instead of long.

This message was sent by Atlassian JIRA

View raw message