[hibernate-issues] [Hibernate-JIRA] Commented: (OGM-10) Discuss with Manik whether or not a copy on read is necessary

Sanne Grinovero (JIRA) noreply at atlassian.com
Mon Sep 5 12:09:05 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/OGM-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43442#comment-43442 ] 

Sanne Grinovero commented on OGM-10:
------------------------------------

what Manik was referring to is a feature which needs to be enabled, not something Infinispan does in all cases.

The code relevant to this value copy is in org.infinispan.marshall.MarshalledValue, and its current implementation is just a performance detail, in no case (with no configuration) you can mandate the MarshalledValue to guarantee the return of a new copy for each invocation: two concurrent get() operations might retrieve the same instance with the current locking granularity.

We could change Infinispan's implementation to provide such a feature, but something like this would need to be reimplemented for other dialects anyway so I guess we have to make copies for non-immutable values which are exposed to user API (or otherwise modified)

> Discuss with Manik whether or not a copy on read is necessary
> -------------------------------------------------------------
>
>                 Key: OGM-10
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/OGM-10
>             Project: Hibernate OGM
>          Issue Type: Task
>            Reporter: Emmanuel Bernard
>             Fix For: 3.0-next
>
>
> From what Manik said recently, they do marshal data when putting it in the map and thus a copy on read is not necessary.
> Clarify that and make sure mutable types do a proper copy on read if that's not the case.

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

        


More information about the hibernate-issues mailing list