geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darrel Schneider (JIRA)" <>
Subject [jira] [Created] (GEODE-1290) AbstractRegionEntry.prepareValueForCache should call event.setCachedSerializedNewValue
Date Fri, 22 Apr 2016 23:09:13 GMT
Darrel Schneider created GEODE-1290:

             Summary: AbstractRegionEntry.prepareValueForCache should call event.setCachedSerializedNewValue
                 Key: GEODE-1290
             Project: Geode
          Issue Type: Bug
          Components: offheap
            Reporter: Darrel Schneider

AbstractRegionEntry.prepareValueForCache has an off-heap part of the code that copies the
heap value to a byte array for storing it in off-heap memory.
When it does this it should call EntryEventImpl.setCachedSerializedNewValue in case this operation
needs to serialized value again.
The place to do this call is marked in the following code with TODO OFFHEAP:
        byte[] data;
        boolean isSerialized = !(val instanceof byte[]);
        if (isSerialized) {
          if (event != null && event.getCachedSerializedNewValue() != null) {
            data = event.getCachedSerializedNewValue();
          } else if (val instanceof CachedDeserializable) {
            data = ((CachedDeserializable)val).getSerializedValue();
            // TODO OFFHEAP: cache data in event?
          } else if (val instanceof PdxInstance) {
            try {
              data = ((ConvertableToBytes)val).toBytes();
              // TODO OFFHEAP: cache data in event?
            } catch (IOException e) {
              throw new PdxSerializationException("Could not convert " + val + " to bytes",
          } else {
            data = EntryEventImpl.serialize(val);
            // TODO OFFHEAP: cache data in event?

This message was sent by Atlassian JIRA

View raw message