How to handle Avro schema change in Redisson

Open
#3,433 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java, redis
Domain
backend, databases

Research direction

The issue names Avro, AvroJacksonCodec, SerializationCodec, MarshallingCodec, KryoCodec, and JsonJacksonCodec; start by comparing their schema-evolution behavior against the reported deserialization exception. Done is not defined in the report, so a responder would need to establish a supported codec or configuration and a reproducible demonstration for old data after adding a field.

Written by the indexing model from the issue text.

Description

question

I am using avro schema. Which looks like below.
{
"name": "TestingData",
"type": "record",
"namespace": "com.avro.testing",
"doc": "testing information",
"fields": [
{
"name": "testingId",
"type": [
"string"
],
"doc": "the unique identifier for the testing"
},
{
"name": "displayName",
"type": [
"string",
"null"
],
"doc": "the display name of participant"
},
{
"name": "updateTimeMillis",
"type": "long",
"doc": "timestamp at which testing started."
}
]
}

Using various codecs available in redisson, I am storing the above object.
Now If I make a change in the schema(adding a new field), I am getting a deserialization exception, while retrieving old object back.
I have tried using AvroJacksonCodec, SerializationCodec, MarshallingCodec.

I have read that using kryoCodec it is possible. But could not find any working demo.
JsonJacksonCodec has some issues with org.apache.avro.util.Utf8. So that is also not helping in schema evolution.

Redisson Version:
3.14.0

Dominant language
Java
Stars
24.4k
Forks
5.5k
Avg merge
4d 12h
Merged PRs (30d)
12

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from redisson/redisson

All issues in redisson/redisson

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.