[infinispan-issues] [JBoss JIRA] Commented: (ISPN-858) MIMECacheEntry requires a version

Manik Surtani (JIRA) jira-events at lists.jboss.org
Wed Jan 5 13:43:17 EST 2011


    [ https://issues.jboss.org/browse/ISPN-858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573545#comment-12573545 ] 

Manik Surtani commented on ISPN-858:
------------------------------------

Well, if the contents change to something that is equal then you have an unnecessary counter increment.  E.g.,

MIMECacheEntry.setValue("a"); // version = 1
MIMECacheEntry.setValue("a"); // version = 2
MIMECacheEntry.setValue("a"); // version = 3

You could just increment the version if the value changes, but that means doing an equals() on a byte[] which is expensive.  I wonder if calculating a MurmurHash on the contents is faster/cheaper.  :-)

> MIMECacheEntry requires a version
> ---------------------------------
>
>                 Key: ISPN-858
>                 URL: https://issues.jboss.org/browse/ISPN-858
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Cache Server
>    Affects Versions: 4.2.0.Final, 5.0.0.ALPHA1
>            Reporter: Galder Zamarreño
>            Assignee: Galder Zamarreño
>             Fix For: 4.2.1.Final, 5.0.0.BETA1
>
>
> ETag calculation requires MIMECacheEntry to carry a version similar to HotRod/Memcached in order to avoid collisions with closely followed updates.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the infinispan-issues mailing list