Patrick Johnsn created GEODE-8733: ------------------------------------- Summary: Local region holds onto data by reference Key: GEODE-8733 URL: https://issues.apache.org/jira/browse/GEODE-8733 Project: Geode Issue Type: Improvement Components: regions Affects Versions: 1.13.0 Reporter: Patrick Johnsn
If the client region is configured as `CACHING_PROXY`, the data on the server and the data in the local region can become out of sync because the local region stores things by reference, for example, if you were to do: {code:java} list.add(1); list.add(2); list.add(3); list.add(4); map.put(1, "a"); map.put(2, "b"); map.put(3, "c"); map.put(4, "d"); Class1 obj = new Class1(1, list, map); region.put(obj.id, obj); map.clear(); list.clear(); map.put(12, "This shouldn't be here"); list.add(38); System.out.println(region.get(1).toString());{code} the values retrieved by region.get(1) would look like "Class1\{id=1, someList=[38], someMap={12=This shouldn't be here}}" even though that update was made AFTER the put. If you queried the server, you'd get the expected values because you're going directly to the server instead of the local region. This issue was originally reported against Spring Data Geode but is reproducible in plain Geode. Original ticket for context: https://jira.spring.io/browse/DATAGEODE-388 -- This message was sent by Atlassian Jira (v8.3.4#803005)