[
https://issues.apache.org/jira/browse/GEODE-7491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jason Huynh updated GEODE-7491:
-------------------------------
Labels: GeodeCommons (was: )
> Index triggers deserialization of objects embedded in a PDX object
> ------------------------------------------------------------------
>
> Key: GEODE-7491
> URL: https://issues.apache.org/jira/browse/GEODE-7491
> Project: Geode
> Issue Type: Bug
> Components: querying
> Reporter: Dan Smith
> Priority: Major
> Labels: GeodeCommons
>
> Objects that are serialized using PDX are supposed to be indexable even if
> the classes for those objects are not present on the server. However, in
> certain cases, having an index triggers deserialization of objects embedded
> in the PDX object, even if those embedded objects are not indexed. Here's the
> use case:
> 1. a PDX object with a String field (eg "name") and a nested java
> serializable object (eg "Customer")
> 2. The class for the java serializable object is not on the classpath of the
> server
> 3. An index on the string field.
> 4. Performing an update on the object will result in a
> IndexMaintenanceException caused by a ClassNotFoundException
> The reason seems to be that the CompactRangeIndex.removeMapping method that
> gets called to remove the old index mapping for the old value adds the old
> region value to a HashSet. This requires computing the hashCode of the
> PDXInstance. By default, PDXInstance.hashCode computes the hashcode of all of
> the fields. The "Customer" Field in the example above cannot be deserialized
> for a hashCode.
> Setting the identity fields of the PDX using PdxWriter.markIdentityField can
> work around the issue, but PDX objects should probably be indexable without
> this.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)