3 Replies Latest reply on Feb 9, 2007 5:20 AM by manik

    TreeCache with INVALIDATION_SYNC mode and DB sync issue.

    balderman

      Hi
      I am using TreeCach with INVALIDATION_SYNC mode.
      I cache large object graphs so I just want just to notify all cluster nodes when an entry is modified and make rest of the nodes fetch a fresh copy from DB.
      Lets say I have 2 nodes cluster with node#1 and node#2.
      A cached object is modified on node#1, it sends notification to the other node and update the records on DB.Now the load balancer ask node#2 to do something with this object, so it tries to fetch from cache, see its not there and goes to DB to get a fresh copy.
      My concern is: What if node#1 did not commit the update yet? node#2 will get an old copy...
      How can I make sure that I will fetch a "fresh" copy from DB?
      Using the pojo cache will bypass this problem but I am limited with memory so I am afraid I cant use it.

      Thanks

      Avishay