3 Replies Latest reply on Feb 22, 2007 11:28 AM by Manik Surtani

    Weird TreeCache.printDetails()

    Piero Ottuzzi Newbie

      Hi there,

      I'm getting strange results from the method TreeCache.printDetails().
      I'm constructing a tree like:

      /USER
       /USER_ID_1
       /INFO
       ...
       ...
       /USER_ID_2
       ...
       ...
       /USER_ID_N


      When the cache is initialized everything is OK but after some time (say 1 hour) the printDetails() method show something like this:

      /USER
      jboss:internal:uninitialized: null
      
       /30815
      
       /31135
      jboss:internal:uninitialized: null
      
       /31137
      
       /29970
      jboss:internal:uninitialized: null
      
       /29544


      Should I get worried?
      Am I doing something wrong?
      The log says:
      2007-02-15 10:42:33,190 DEBUG - process(): region: /USER/
      2007-02-15 10:42:33,190 DEBUG - processed 0 node events in region: /USER/
      2007-02-15 10:42:33,190 DEBUG - Recycle queue is empty



      Many thanks
      Bye
      Piero

        • 1. Re: Weird TreeCache.printDetails()
          Elias Ross Master

          The "jboss:internal:..." data key indicates that the node was evicted to disk and thus if accessed again should be loaded from disk.

          • 2. Re: Weird TreeCache.printDetails()
            Piero Ottuzzi Newbie

            Hi Genman,all,

            thank you for your reply.
            I'm a little bit surprised by your response because I do not use any cacheLoader... here is my configuration:

            <?xml version="1.0" encoding="UTF-8"?>
            <server>
            
             <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
            
             <mbean code="org.jboss.cache.TreeCache"
             name="jboss.cache:service=TreeCache">
            
             <depends>jboss:service=Naming</depends>
             <depends>jboss:service=TransactionManager</depends>
            
             <attribute name="TransactionManagerLookupClass">org.jboss.cache.GenericTransactionManagerLookup</attribute>
            
             <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
             <attribute name="IsolationLevel">READ_COMMITTED</attribute>
             <attribute name="CacheMode">REPL_ASYNC</attribute>
            
             <attribute name="UseReplQueue">false</attribute>
             <attribute name="ReplQueueInterval">1000</attribute>
             <attribute name="ReplQueueMaxElements">5</attribute>
            
             <attribute name="ClusterName">TreeCache-RA-Cluster</attribute>
             <attribute name="ClusterConfig">
             <config>
             <UDP mcast_addr="228.1.2.3" mcast_port="48866"
             ip_ttl="64" ip_mcast="true"
             mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
             ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
             loopback="false"/>
             <PING timeout="2000" num_initial_members="3"
             up_thread="false" down_thread="false"/>
             <MERGE2 min_interval="10000" max_interval="20000"/>
             <FD_SOCK/>
             <VERIFY_SUSPECT timeout="1500"
             up_thread="false" down_thread="false"/>
             <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
             max_xmit_size="8192" up_thread="false" down_thread="false"/>
             <UNICAST timeout="600,1200,2400" down_thread="false"/>
             <pbcast.STABLE desired_avg_gossip="20000"
             up_thread="false" down_thread="false"/>
             <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
             shun="true" print_local_addr="true"/>
             <FC max_credits="2000000" down_thread="false" up_thread="false"
             min_threshold="0.20"/>
             <FRAG frag_size="8192" down_thread="false" up_thread="true"/>
             <pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/>
             </config>
             </attribute>
            
             <attribute name="FetchInMemoryState">true</attribute>
            
             <attribute name="InitialStateRetrievalTimeout">20000</attribute>
            
             <attribute name="SyncReplTimeout">20000</attribute>
            
             <attribute name="LockAcquisitionTimeout">15000</attribute>
            
             <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
            
             <attribute name="EvictionPolicyConfig">
             <config>
             <attribute name="wakeUpIntervalSeconds">30</attribute><!-- 30 SECONDS -->
             <!-- Cache wide default -->
             <region name="/_default_">
             <attribute name="maxNodes">10000</attribute>
             <attribute name="timeToLiveSeconds">1800</attribute><!-- 30 MINUTES -->
             <attribute name="maxAgeSeconds">1800</attribute><!-- 30 MINUTES -->
             </region>
             <region name="/USER/">
             <attribute name="maxNodes">1000</attribute>
             <attribute name="timeToLiveSeconds">900</attribute><!-- 15 MINUTES -->
             <attribute name="maxAgeSeconds">900</attribute><!-- 15 MINUTES -->
             </region>
             </config>
             </attribute>
            
             <attribute name="UseRegionBasedMarshalling">true</attribute>
            
             </mbean>
            
            </server>
            


            What you say can explain some behaviour I observed but it open many more questions:
            1) is it a default that I can disable?
            2) where is it saving cached objects on disk?

            Many thanks for your patience... I really love to understand how things works.

            Bye
            Piero

            • 3. Re: Weird TreeCache.printDetails()
              Manik Surtani Master

              It doesn't matter if you use a cache loader or not. If you have an eviction policy set up, it will start to clear stuff from memory if it fills up.

              Usually this involves removing a node, but if the node has children, then it will just remove the data in the node and mark the node as uninitialised.

              HTH.