3 Replies Latest reply on Jan 19, 2012 5:40 AM by galder.zamarreno

    Concurrent read writes to root node of treecache in a cluster

    sandkuma

      I am having data consistency issues trying to make concurrent writes to the root node of a tree cache.

      I am using infinispan version 5.1CR3.

       

      I have used the following patterns:

      Used putIfAbsent(key,data) and get(key)

      Also used

      TransactionManager tm = cacheManager.getTransactionmanager();

      destinationTreeCache.getRoot().put(uuidLocal, dataToBePut,Flags.FORCE_SYNCHRONOUS,Flags.PUT_FOR_EXTERNAL_READ);

      tm.commit();

       

      Configuration is as follows:

      cache mode Distributed Async

      isolation level Read commited

      Locking pessimistic

      Transaction mode transactional

      sync commit phase true.

       

      Further will calls like getKeys() return all the keys of that cache in the cluster or return only keys that are present locally on  the node? is there a way to get all the keys for a particular cache in the cluster?