| The problem is that with async cache all updates travel through primary owner in order to apply them in the same order on all nodes. With local-only put we could overwrite record with a higher timestamp. Ideally, we could do a max operation when applying the timestamps. To put some historical context to this: in Infinispan < 5.2 (IIRC) the routing in replicated caches was different, which led to divergences in async caches and deadlocks in sync ones. However it suited the clustered timestamps regions more. Anyway, the impact of having diverging values is low, lower than the trouble with returning stale query (which must be tolerated by an app using query cache, but it's still better to return non-stale results). The proposed fix is acceptable IMO. |