[
https://issues.apache.org/jira/browse/CASSANDRASC-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17737867#comment-17737867
]
ASF subversion and git services commented on CASSANDRASC-53:
------------------------------------------------------------
Commit 3cbb3d19c6f043b3a20e4933e5ff7a0e3d58f0a9 in cassandra-sidecar's branch
refs/heads/trunk from Francisco Guerrero
[ https://gitbox.apache.org/repos/asf?p=cassandra-sidecar.git;h=3cbb3d1 ]
CASSANDRASC-53 Ignore unknown properties during Sidecar client deserialization
This commit modifies the way the `DecodableRequest` handles unknown properties
in the
JSON payload. To support the evolution of the server API, we allow the Sidecar
Client
to be more flexible when it encounters unknown properties, and we make it
ignore these
new properties.
patch by Francisco Guerrero; reviewed by Dinesh Joshi, Yifan Cai for
CASSANDRASC-53
> [Sidecar Client] Allow unknown fields in the response
> -----------------------------------------------------
>
> Key: CASSANDRASC-53
> URL: https://issues.apache.org/jira/browse/CASSANDRASC-53
> Project: Sidecar for Apache Cassandra
> Issue Type: Improvement
> Components: Configuration
> Reporter: Francisco Guerrero
> Assignee: Francisco Guerrero
> Priority: Normal
> Labels: pull-request-available
>
> While testing CASSANDRASC-52 on the server side, the Sidecar client based off
> of {{trunk}} failed to deserialize the JSON payload with error
> {code:java}
> Caused by:
> o.a.c.sidecar.client.shaded.com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:
> Unrecognized field "sidecar" (class
> org.apache.cassandra.sidecar.common.NodeSettings), not marked as ignorable (2
> known properties: "releaseVersion", "partitioner"])
> at [Source:
> (byte[])"{"releaseVersion":"4.0.9-SNAPSHOT","partitioner":"org.apache.cassandra.dht.Murmur3Partitioner","sidecar":{"version":"1.0-SNAPSHOT"}}";
> line: 1, column: 107] (through reference chain:
> org.apache.cassandra.sidecar.common.NodeSettings["sidecar"])
> at
> o.a.c.sidecar.client.shaded.com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
> at
> o.a.c.sidecar.client.shaded.com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:1132)
> {code}
> As we are evolving the code, we expect the API on the server side to evolve.
> The deployed clients need to tolerate these new fields in the response JSON
> payload to continue working correctly.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]