[CONTROLLER-2072] Remove Kryo from atomix-storage Created: 02/Mar/23 Updated: 29/Dec/23 |
|
| Status: | In Review |
| Project: | controller |
| Component/s: | clustering |
| Affects Version/s: | None |
| Fix Version/s: | 8.0.5 |
| Type: | Improvement | Priority: | High |
| Reporter: | Robert Varga | Assignee: | Samuel Schneider |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | pick-next, pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
We do not need full serdes capabilities of Kryo, certainly not its ASM/Objenesis dependencies. Examine the interplay of sal-akka-segmented-journal with Kryo and replace it with a simpler interface, which will result in binary-compatible serialization format. This will allow us to not shade Kryo, significantly reducing the amount of classes we ship. |
| Comments |
| Comment by Robert Varga [ 02/Mar/23 ] |
|
Patches leading to https://git.opendaylight.org/gerrit/c/controller/+/104745 encapulate Kryo so users are not directly exposed to it, while defanging the implementation. At that patch Kryo is an implementation detail and can be replaced by providing an alternative to KryoJournalSerdes – which really boils down to:
|
| Comment by Robert Varga [ 02/Mar/23 ] |
|
Also, the @VisibleForTesting methods can actually be replaced with either a plain DataOutput.writeInt(), or perhaps WritableObjects.writeLong() – it is just testing, we do not actually need that. |
| Comment by Tibor Král [ 01/Jun/23 ] |
|
In terms of us implementing EntryInput/EntryOutput in a binary compatible way, we'll probably need to directly reuse the implementation from com.esotericsoftware.kryo.io.Output and Input classes. Basically a copy-paste into our EntryInput/EntryOutput classes. I don't like this approach. Do we have any other choice? |
| Comment by Robert Varga [ 01/Jun/23 ] |
|
Depends on how much of that we are really using in the codepaths we are taking. |