-
Enhancement
-
Resolution: Won't Do
-
Major
-
None
-
None
Following up on this topic, this is what I have setup:
2 nodes in cluster (either lib mode or remote) - node-1 and node-2
a cache setup as distributed, synchronous (dist_sync)
cache.put("key", "value", -1, TimeUnit.MILLISECONDS, 2000, TimeUnit.MILLISECONDS);
for (i = 0; i < 10; i++) {
sleep(1000) // sleep 1 second
cache.get("key");
}
Here is the weird thing, after a few gets, I'm starting to get null results. This doesn't occur when there is only 1 node in the cluster.
I'm suspecting that, w/ when accessing the data, it could be accessing 1 of the 2 nodes based on load balancing.
cache.get("key") -> node-1 // 1s
cache.get("key") -> node-1 // 2s
cache.get("key") -> node-1 // 3s
cache.get("key") -> node-2 // oops, this is already expired on node-2
It would be nice to be able to make sure when accessing an entry from one node, the entry copies on other nodes are also "touched".