Skip to content

updated redis version and provided serialization option#1710

Merged
rfecher merged 1 commit intolocationtech:masterfrom
rfecher:redisson-version-update
Apr 22, 2020
Merged

updated redis version and provided serialization option#1710
rfecher merged 1 commit intolocationtech:masterfrom
rfecher:redisson-version-update

Conversation

@rfecher
Copy link
Copy Markdown
Contributor

@rfecher rfecher commented Apr 22, 2020

There are several github issues and stackoverflows referring to a memory leak when using FST with redisson. We were seriously running up against this issue and despite what this [1] says, the latest version does not simply resolve it. However, I figure it won't hurt to update to the latest version. We actually only use a provided serialization codec for the data index when secondary indexing is enabled - unfortunately that is our use case. As it stood GeoWave just always uses FST codec for that, which is Redisson's default codec. The only thing GeoWave is serializing for the data index is a byte[] so its very straightforward - I'm not sure the advantages/disadvantages of different codec when serializing an object as simple as an array of primitives. My first instinct was to just have our own custom codec just like we have our own codec for every other redisson collection such as the index rows and the metadata rows. However, maintaining complete backwards compatibility with any data store prior to this PR would mean that whatever new code path that circumvents this FST codec issue has to be optional and the FST codec has to be the default behavior. So then I provided the option for a series of 9 serialization options from this list [2]. However, when running with that there'd be a ClassNotFoundException on a Kryo class from our apps without adding more to the classpath which seemed odd (even though we weren't using Kryo and I was using a Supplier interface so no instantiation happened statically it was just resolving the codec class). Considering this is only to serialize a byte[] for secondary indexing and I don't really know. the advantage of using any of these codecs aside from avoiding memory leaks with FST, I backed it down to whats in this PR, using FST by default and the JDK serialization as an option. We enable JDK serialization through that option and the memory leaks go away so in the end I am sufficiently happy with giving the JDK option, and should we choose to add more, its very easy (without benchmarks I'm not sure to what end though).
[1] redisson/redisson#1927
[2] https://github.com/redisson/redisson/wiki/4.-data-serialization

@rfecher rfecher requested a review from jdgarrett April 22, 2020 13:44
@rfecher rfecher force-pushed the redisson-version-update branch from c64daa9 to 6c9f303 Compare April 22, 2020 13:45
Signed-off-by: Rich Fecher <rich.fecher@blacklynx.tech>
@rfecher rfecher force-pushed the redisson-version-update branch from 6c9f303 to 5f4545e Compare April 22, 2020 20:16
@rfecher rfecher merged commit 474d777 into locationtech:master Apr 22, 2020
@rfecher rfecher deleted the redisson-version-update branch April 22, 2020 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants