0 Replies Latest reply on Aug 30, 2007 4:56 AM by Sebastien Pennec

    Cache loading in a clustered environment

    Sebastien Pennec Newbie


      I'm in front of a very strange situation here:

      There are two members in my cluster. Each instanciates a treecache object, with the same properties. (Mode INVALIDATION_ASYNC, Optimistic locking, TreeCache V1.4.1SP4).

      When they start, each of them loads the initial state of the cache from a database. Since the cached data is several huge lists (130K+ objects), the replication is turned off, because it created OutOfMem exceptions.

      The problem is that when instance A of the cluster retrieves the data and caches it, the corresponding node in instance B is evicted. Then, when B evaluates the data and caches it, the node in instance A is evicted.

      I've been able to prevent that behaviour in doing some trick that I suppose is not "best practice": I start the cache, get its configured cache mode, stop it, set cache mode to LOCAL, get the data and fill the cache, stop it again, set its mode to the previous value and start it again.

      As surprising as it may seen, the data is still here, even after the stop/start and change of cache mode.

      I guess that this situation has been seen over and over again, but I couldn't find anything that could help me.

      Any advice would be highly appreciated.