You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directmemory.apache.org by "Raffaele P. Guidi (JIRA)" <ji...@apache.org> on 2012/08/06 23:57:03 UTC
[jira] [Created] (DIRECTMEMORY-99) CacheServiceImpl.store does not
add back the pointer to the map in case it already existed
Raffaele P. Guidi created DIRECTMEMORY-99:
---------------------------------------------
Summary: CacheServiceImpl.store does not add back the pointer to the map in case it already existed
Key: DIRECTMEMORY-99
URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-99
Project: Apache DirectMemory
Issue Type: Bug
Reporter: Raffaele P. Guidi
Assignee: Raffaele P. Guidi
This code illustrates my problem:
CacheService<String, Long> cache = new DirectMemory<String, Long>()
.setNumberOfBuffers(10)
.setSize(1000)
.setInitialCapacity(100000)
.setConcurrencyLevel(4)
.newCacheService();
System.out.println("a : " + cache.retrieve("a"));
System.out.println("a -> 3 : " + cache.put("a", 3L));
System.out.println("a : " + cache.retrieve("a"));
System.out.println("a -> 5 : " + cache.put("a", 5L));
System.out.println("a : " + cache.retrieve("a"));
Running it gives this output:
a : null
a -> 3 : PointerImpl[0, 0] not free
a : 3
a -> 5 : PointerImpl[0, 0] not free
a : null
--
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
[jira] [Commented] (DIRECTMEMORY-99) CacheServiceImpl.store does
not add back the pointer to the map in case it already existed
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRECTMEMORY-99?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429489#comment-13429489 ]
Hudson commented on DIRECTMEMORY-99:
------------------------------------
Integrated in directmemory-trunk #295 (See [https://builds.apache.org/job/directmemory-trunk/295/])
solved issue DIRECTMEMORY-99 (Revision 1370036)
Result = FAILURE
raffaeleguidi :
Files :
* /incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheServiceImpl.java
* /incubator/directmemory/trunk/directmemory-cache/src/test/java/org/apache/directmemory/cache/BasicTest.java
> CacheServiceImpl.store does not add back the pointer to the map in case it already existed
> -------------------------------------------------------------------------------------------
>
> Key: DIRECTMEMORY-99
> URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-99
> Project: Apache DirectMemory
> Issue Type: Bug
> Reporter: Raffaele P. Guidi
> Assignee: Raffaele P. Guidi
>
> This code illustrates my problem:
> CacheService<String, Long> cache = new DirectMemory<String, Long>()
> .setNumberOfBuffers(10)
> .setSize(1000)
> .setInitialCapacity(100000)
> .setConcurrencyLevel(4)
> .newCacheService();
> System.out.println("a : " + cache.retrieve("a"));
> System.out.println("a -> 3 : " + cache.put("a", 3L));
> System.out.println("a : " + cache.retrieve("a"));
> System.out.println("a -> 5 : " + cache.put("a", 5L));
> System.out.println("a : " + cache.retrieve("a"));
> Running it gives this output:
> a : null
> a -> 3 : PointerImpl[0, 0] not free
> a : 3
> a -> 5 : PointerImpl[0, 0] not free
> a : null
--
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
[jira] [Resolved] (DIRECTMEMORY-99) CacheServiceImpl.store does not
add back the pointer to the map in case it already existed
Posted by "Raffaele P. Guidi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRECTMEMORY-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Raffaele P. Guidi resolved DIRECTMEMORY-99.
-------------------------------------------
Resolution: Fixed
fixed calling free AND adding the pointer to the map again
> CacheServiceImpl.store does not add back the pointer to the map in case it already existed
> -------------------------------------------------------------------------------------------
>
> Key: DIRECTMEMORY-99
> URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-99
> Project: Apache DirectMemory
> Issue Type: Bug
> Reporter: Raffaele P. Guidi
> Assignee: Raffaele P. Guidi
>
> This code illustrates my problem:
> CacheService<String, Long> cache = new DirectMemory<String, Long>()
> .setNumberOfBuffers(10)
> .setSize(1000)
> .setInitialCapacity(100000)
> .setConcurrencyLevel(4)
> .newCacheService();
> System.out.println("a : " + cache.retrieve("a"));
> System.out.println("a -> 3 : " + cache.put("a", 3L));
> System.out.println("a : " + cache.retrieve("a"));
> System.out.println("a -> 5 : " + cache.put("a", 5L));
> System.out.println("a : " + cache.retrieve("a"));
> Running it gives this output:
> a : null
> a -> 3 : PointerImpl[0, 0] not free
> a : 3
> a -> 5 : PointerImpl[0, 0] not free
> a : null
--
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