You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Vandahl (Resolved) (JIRA)" <ji...@apache.org> on 2011/10/30 19:48:32 UTC

[jira] [Resolved] (JCS-74) Some data may be lost when adding/removing entries with the same key

     [ https://issues.apache.org/jira/browse/JCS-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Vandahl resolved JCS-74.
-------------------------------

       Resolution: Fixed
    Fix Version/s: jcs-1.4-dev

Duplicate
                
> Some data may be lost when adding/removing entries with the same key
> --------------------------------------------------------------------
>
>                 Key: JCS-74
>                 URL: https://issues.apache.org/jira/browse/JCS-74
>             Project: JCS
>          Issue Type: Bug
>          Components: Indexed Disk Cache
>            Reporter: Alexander Sofronov
>            Assignee: Aaron Smuts
>             Fix For: jcs-1.4-dev
>
>
> I see this problem in jcs-1.3.3.5-RC.jar.
> When adding/removing data to IndexedDiskCache some data may be lost.
> Consider the following sample:
> cache.put("key", "value1");
> cache.put("key", "value2");
> cache.put("key", "value3");
> After running this code the cache often stores only "value1", other values may be lost. It looks like this is caused by asynchronous cache update mechanism, adding some pause (say Thread.sleep(100)) between different puts fixes the problem.
> Also (it may be another bug actually) it could happen that the following code will not write any data to the cache:
> cache.put("key", "value1");
> cache.remove("key");
> cache.put("key", "value2");
> This happens non-deterministically on my machine, in case of problems with reproducing this try put some other data before this test to make the queue longer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira