I'm a little confused about how caches work with functions...
Setup is spring-gemfire so forgive me if I mix terms in the example.
I have a replicated region on a server.
I'm running a client region.
I have a function registered on the server that deletes a record as part of a transaction (@Transactional, using the spring-gemfire Txmgr).
That all works fine. I can see the logs, the transaction is doing what it should.
What drove me nuts yesterday was when I tried to test this.
I wrote a unit test that looked a little like this - excuse the pseudocode and the template. If I use region instead I get the same behaviour.
Obj = template.get(key);<function>.delete(key);
Obj1 = template.get(key); <== expected to be null
template.put(key, obj);
Initially the client region was set up with shortcut="CACHING_PROXY" and Obj1 was never null.
I thought perhaps this was a timing thing (eventually consistent and all that) and tried adding waits after the function executed. Still the same.
Tx comitted well before the second get.
When I set it up to be "PROXY" instead I got the behaviour I expected.
I'm reaching a bit, but it appears based on this test that a client region isn't updated when the server region is.
Is this expected behaviour? Is the cache in CACHING_ truly ~just~ a cache with no data aware behaviour?