findById() returns the wrong data [DATAGEODE-388] #433
I'm getting weird data back from Geode 1.13 when using spring data for geode findById()
This is proof of concept code
The logic is implemented in MyRunner.java
The class is simple, the data is stored correctly in Geode 1.13
The region is created like this: gfsh> create region --name=TestRegion --type=PARTITION_REDUNDANT_PERSISTENT --recovery-delay=10000 --disk-store=DataPersistence --enable-statistics=true --eviction-action=overflow-to-disk --compressor='org.apache.geode.compression.SnappyCompressor' --redundant-copies=1
Issue: findById() returns the wrong data while findAll() works fine
The text was updated successfully, but these errors were encountered:
This is actually Apache geode behavior rather than a Spring specific thing. The problem is that the local region is holding on to things by reference and the objects
John Blum commented
Thank you yozaner1324 for the analysis and tracking down the underlying (root cause of the) problem.
To close this ticket off (tie-up), I wanted to share what I shared internally, concerning this particular problem, and why it is specifically a GEODE issue, and not caused by Spring (Data)!
In a nutshell, the difference between
Keep in mind that SDG provides a base implementation of the
This becomes apparent when you look into the SD[G] Repository infrastructure implementation.
First, your SDG application-specific
The provided, simple
So, it is for this reason why Geode is the culprit in this case, hence GEODE-8733.
Hopes this helps to clarify the matter