3 Replies Latest reply on Aug 31, 2011 1:08 PM by mircea.markus

    cache loading in a cluster - question

    dmitry123

      Hi,

       

      I would like to have a cache replicated in a cluster. When a new node comes up and the cache starts to receive data from another cache during startup, is it ok to write or read from the cache before it receives all of data? Any documentation on this?

        • 1. Re: cache loading in a cluster - question
          dmitry123

          just wanted to clarify my question. i understand the semantics of writing to a cache before it's loaded. my question was meant to find out the specifics of Inifinispan - it it let's you read/write from partially loaded cache, and if it does then how does it merge data from the partially loaded cache with the rest of the cluster.

           

          i see there's a CacheStarted callback so i'll use that in my custom Future for now. but i still would like to know the behavior of Infinispan in my given scenario. thank you.

          • 2. Re: cache loading in a cluster - question
            galder.zamarreno

            A cache can be preloaded in several ways, whether using state transfer to retrieve state from another node in the cluster, or via cache store preload where a previously populated cache store is read. In both cases, the preloading or state transfer needs to finish before you can read/write to it.

            1 of 1 people found this helpful
            • 3. Re: cache loading in a cluster - question
              mircea.markus

              When a new node comes up and the cache starts to receive data from another cache during startup, is it ok to write or read from the cache before it receives all of data? Any documentation on this?

              You won't be able to write to the starting cache before it is started - and that includes transfering data from existing members.

              It is safe to write to other members and infinispan will take care of data consistency for you.

              1 of 1 people found this helpful