The fix seems to have mitigated the NPE from within redis-om-spring by substituting the null JSON data with an empty String.
This does not seem to be a good solution. It would be much better to treat the Document as inexistent and to return an empty Optional object, because the gson deserialization may result in a uninitialized Object, that causes issues for application developers.
Hi, this is a follow-up to #131 .
The fix seems to have mitigated the NPE from within redis-om-spring by substituting the null JSON data with an empty String. This does not seem to be a good solution. It would be much better to treat the Document as inexistent and to return an empty Optional object, because the gson deserialization may result in a uninitialized Object, that causes issues for application developers.
Here is a basic Spring app reproducing this issue on the latest release to this day, v0.9.3: https://github.com/ClemaX/redis-om-spring-ttl-bug-repro
I added a reproduction script that uses docker and the
redislabs/redisearch:2.8.8
image.Steps to reproduce: