4 Replies Latest reply on Sep 9, 2008 10:27 AM by milchkaffee

    Big HashMap stored to cache - problems with replication

    milchkaffee

      Hi,

      I've got a problem with the replication of the cache. I put a big Map (about 4 MByte) to the cache. On the local cache everything works fine. But it doesn't get replicated to the cache on the other cluster member. I don'T get an error nor an exception. The map only has four key/value-pairs. But under every pair there is another Map and under this again another Map.

      My configuration is REPL_ASYNC and REPEATABLE_READ.

      Map<String, Map<AttributeName, AttributeProperty>> tempGroupCache;
      ...fill tempGroupCache from the database...
      this.tree.put(this.TREECACHE_NODENAME_GROUPCACHE, tempGroupCache);

      Is there a problem with the replication of big maps?

      Greets, Jens

        • 1. Re: Big HashMap stored to cache - problems with replication
          mircea.markus

          the replication is being made asynchronously, phps you are reading too soon from the secondary cache, and the replication didn't have time to finish. Do you have a replication queue enabled - this may also delay things a bit? I suggest switching to sync_replication just to check how long it takes to replicate data.

          • 2. Re: Big HashMap stored to cache - problems with replication
            milchkaffee

            Thanks for your reply. The asynchronously replication doesn't seem to be the problem. Even after changing to REPL_SYNC the replication doesn't happen.

            configuration part:
            ...
            false
            true
            15000
            15000
            10000

            true
            true
            ...

            I use the methods registerClassLoder and activateRegion to activate the replication. I'm not sure if the configuration is the problem. In other cases of smaller cache nodes the replication works fine. But in the other cases I cache smaller object and not big Maps.

            • 3. Re: Big HashMap stored to cache - problems with replication
              milchkaffee

              Thanks for your reply. The asynchronously replication doesn't seem to be the problem. Even after changing to REPL_SYNC the replication doesn't happen.

              configuration part:
              ...

              <attribute name="UseReplQueue">false</attribute>
              <attribute name="FetchInMemoryState">true</attribute>
              <attribute name="InitialStateRetrievalTimeout">15000</attribute>
              <attribute name="SyncReplTimeout">15000</attribute>
              <attribute name="LockAcquisitionTimeout">10000</attribute>
              <attribute name="EvictionPolicyClass"></attribute>
              <attribute name="UseRegionBasedMarshalling">true</attribute>
              <attribute name="InactiveOnStartup">true</attribute>

              ...

              I use the methods registerClassLoder and activateRegion to activate the replication. I'm not sure if the configuration is the problem. In other cases of smaller cache nodes the replication works fine. But in the other cases I cache smaller object and not big Maps.

              • 4. Re: Big HashMap stored to cache - problems with replication
                milchkaffee

                The problem is solved. I've got problems with my own coding. Sorry.