incubator-directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRECTMEMORY-73) NPE on put method in CacheServiceImpl when cache is full.
Date Sun, 26 Feb 2012 15:08:48 GMT

    [ https://issues.apache.org/jira/browse/DIRECTMEMORY-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216762#comment-13216762
] 

Hudson commented on DIRECTMEMORY-73:
------------------------------------

Integrated in directmemory-windows #4 (See [https://builds.apache.org/job/directmemory-windows/4/])
    [DIRECTMEMORY-73] NPE on put method in CacheServiceImpl when cache is full.
Submitted by Michael André Pearce.
Patch modified with code formatting rule we use. (Revision 1293849)

     Result = SUCCESS
olamy : 
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/CacheServiceImplTest.java

                
> NPE on put method in CacheServiceImpl when cache is full.
> ---------------------------------------------------------
>
>                 Key: DIRECTMEMORY-73
>                 URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-73
>             Project: Apache DirectMemory
>          Issue Type: Bug
>            Reporter: Michael André Pearce
>            Assignee: Olivier Lamy
>             Fix For: 0.6.0
>
>         Attachments: DIRECTMEMORY-73.patch
>
>
> If cache is full, and try doing a put with no buffer space left available (i.e. cache
is full) so a null pointer is returned from the memorymanager, this is then put into the hashmap
holding keys and values, thus causing npe. 
> Solutions proposed to fix this:
> When null is returned from memory manager on allocation we dont put into the key pointer
map, and return null.
> Questions to pose for how we want behaviour:
> If key already exists in cache (i.e. update) do we want to remove existing key/pointer
(as obviously user wants a new value), and thus avoids incorrect data presented.
> Or by returning null to the user we expect them to know that update failed and existing
pointer /data will be kept.
> Or finally we allow behaviour configurable?

--
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

       

Mime
View raw message