geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (GEODE-4116) Can't get PDX objects using the new protocol
Date Wed, 03 Jan 2018 19:39:01 GMT


ASF subversion and git services commented on GEODE-4116:

Commit d0a6394d318aa486f50264e90a834dc8ccf76303 in geode's branch refs/heads/feature/GEODE-4009
from [~bschuchardt]
[;h=d0a6394 ]

GEODE-4168 Can't get json object stored as PDX using the new protocol
GEODE-4116 Can't get PDX objects using the new protocol

Added a distributed test to ensure end-to-end handling of JSON documents
is functioning correctly.  For GEODE-4168 I changed the class-check from
equals() to isAssignableFrom().  For GEODE-4116 I modified the Get and
GetAll operation handlers to inhibit deserialization of PdxInstances
when reading values from the cache.  The test for 4116 ensures that
the value is in serialized form by putting it into a distributed Region
in another JVM.

There are unrelated javadoc changes in this commit for and
a couple of classes in the protobuf Driver module.  I also added
constraints to the Regions in the Driver's unit test to get rid of
compilation warnings.

This closes #1209

> Can't get PDX objects using the new protocol
> --------------------------------------------
>                 Key: GEODE-4116
>                 URL:
>             Project: Geode
>          Issue Type: Bug
>          Components: client/server
>            Reporter: Dan Smith
>             Fix For: 1.4.0
>         Attachments: pdx_get_failure.diff
> The new client protocol doesn't correctly support PDX objects. The GetRequestOperationHandler
directly calls region.get, which will *deserialize* the value stored in the region. The operation
handler is expecting to get a PdxInstance back, but that will only happen if the cache has
read-serialized set to true.
> I've attached a unit test that demonstrates this issue. If a region contains PDX objects
and read-serialized is set to false (the default), the new protocol will throw exceptions
if you try to get a value.
> {noformat}
> [error 2017/12/18 15:00:23.302 PST <ServerConnection on port 25194 Thread 0> tid=51]
Received Get request with unsupported encoding: {}
> org.apache.geode.internal.protocol.serialization.exception.UnsupportedEncodingTypeException:
We cannot translate: class org.apache.geode.internal.protocol.protobuf.v1.acceptance.CacheOperationsJUnitTest$TestPdxObject
into a specific Protobuf Encoding
> 	at org.apache.geode.internal.protocol.protobuf.v1.EncodingTypeTranslator.getEncodingTypeForObject(
> 	at org.apache.geode.internal.protocol.protobuf.v1.utilities.ProtobufUtilities.createEncodedValue(
> 	at org.apache.geode.internal.protocol.protobuf.v1.operations.GetRequestOperationHandler.process(
> 	at org.apache.geode.internal.protocol.protobuf.v1.operations.GetRequestOperationHandler.process(
> 	at org.apache.geode.internal.protocol.protobuf.v1.ProtobufOpsProcessor.processOperation(
> {noformat}

This message was sent by Atlassian JIRA

View raw message