[
https://issues.apache.org/jira/browse/GEODE-1297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15256719#comment-15256719
]
Darrel Schneider commented on GEODE-1297:
-----------------------------------------
Another issue with PdxInstances that have references to offheap is
PdxReaderImpl.readPdxString(PdxField).
If this method is called on a PdxInstance with an offheap reference then
"ByteSource.hasArray" will return false resulting in an IllegalStateException.
This code would need to be changed to either copy the offheap data for the
PdxString to a heap byte array or support PdxString instances that have a
reference to off-heap memory (in which case the PdxString would need to be
released).
> use EntryEventImpl.deserializeOffHeap
> -------------------------------------
>
> Key: GEODE-1297
> URL: https://issues.apache.org/jira/browse/GEODE-1297
> Project: Geode
> Issue Type: Improvement
> Components: offheap
> Reporter: Darrel Schneider
>
> At one point some work was done to allow PdxInstances to be created that
> would have a reference to off-heap memory instead of copying the off-heap
> memory to a heap byte array.
> This work was not completed. Currently if you call
> EntryEventImpl.deserializeOffHeap then it will return an optimized
> PdxInstance. But the callers need to be changed to then release that
> PdxInstances off-heap retained reference.
> The main place to look into calling deserializeOffHeap is
> OffHeapStoredObject.getDeserializedValue(Region, RegionEntry) when it
> currently does this: EntryEventImpl.deserialize(getRawBytes())
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)