commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Vandahl (JIRA)" <>
Subject [jira] [Commented] (JCS-153) Size based BlockDiskCache data corruption
Date Wed, 25 Nov 2015 12:58:10 GMT


Thomas Vandahl commented on JCS-153:

I think I found the problem. You forgot to subtract the size of existing elements from the
contentSize on put() and processRemovedLRU(). See my modifications in SVN.

> Size based  BlockDiskCache data corruption
> ------------------------------------------
>                 Key: JCS-153
>                 URL:
>             Project: Commons JCS
>          Issue Type: Bug
>          Components: Composite Cache
>    Affects Versions: jcs-2.0-beta-1
>         Environment: Windows 7, Java 8
>            Reporter: Wiktor N
>         Attachments: size-tests.patch
> As a follow-up to JCS-147 - I've encountered some problems when using BlockDiskCache
and size limitation that sometimes content is dropped due to failed integrity check. It's
not reproducible every time, but I've managed to create the JUnit test that fails every time
just by using simple loop.
> From attached patch, testLoadFromDisk fails on my system every time. I've tried to debug
this, but I've run out of ideas, where to look for the problem.
> Attached patch contains also some restructure of the tests:
> BlockDiskCacheUnitTest renamed to BlockDiskCacheUnitTestAbstract
> IndexDiskCacheUnitTest renamed to IndexDiskCacheUnitTestAbstract
> IndexDiskCacheUnitTestCount ->IndexDiskCacheCountUnitTest
> IndexDiskCacheUnitTestSize -> IndexDiskCacheSizeUnitTest
> BlockDiskCacheUnitTestCount -> BlockDiskCacheCountUnitTest
> BlockDiskCacheUnitTestSize -> BlockDiskCacheSizeUnitTest
> To better align with current patterns looking for tests.

This message was sent by Atlassian JIRA

View raw message