1 Reply Latest reply on Jun 17, 2009 6:41 AM by mircea.markus

    Cache entries could not be read or replicated

      Hi,

      Does it matter if I frequently start and destroy a cache instance in a cluster, and remove cache entries from a cluster? I'm asking this because I got this strange problem that some cache entries were able to be created, but couldn't be read.

      I have a cluster with two nodes as follows:
      1. The nodes N1 and N2 are in different machines. Each node has a cache instance.
      2. The node N1 only reads from cache. If it doesn't find an entry from its local cache, it will read from N2 via a ClusteredCacheLoader with synchronous replication.
      3. The node N2 both reads from and writes to its cache.

      Now I have a monitor program that runs every 10 minutes. It first starts a new cache instance that joins the cluster, removes a specific cache entry using this cache instance, submits a request to the server N2 to recreate the cache entry, and at last destroys the cache instance.

      What's strange is, after a while, the specific cache that got removed and recreated by the monitor program could not be read or replicated anymore, even though the traces clearly showed the entry did get added to the cache instance on N2. By the way, the entry was only used by the monitor program.

      Any suggestions?

      Thanks,

        • 1. Re: Cache entries could not be read or replicated
          mircea.markus

          what configuration are you using?

          What's strange is, after a while, the specific cache that got removed and recreated by the monitor program could not be read or replicated anymore, even though the traces clearly showed the entry did get added to the cache instance on N2

          so the put on N3 does get replicated on N2 but N1 cannot read it from N2? Are you sure that you do any operation on N3 *after* it joined the cluster? After creating the cache it will take a time until cluster is discovered and joined. I suggest logging cluster membership (cache.getMembers()) before doing any operations on N3. Also make sure that the number of members N3 sees is the one desired(i.e. 3), before doing any work with it.