jbosscache1.4 invalidation模式下put会导致发送invalidation的问题

    我们在项目中使用jbosscache来做分布式缓存部分数据库数据。打算用INVALIDATION_SYNC来将remove的数据失效掉,

但令人失望的是,我们在put数据的时候,发现它也会广播invalidation消息,导致数据失效。这样的结果是,只有1台服务器有

缓存数据,其他服务器从数据库取到相同数据put到缓存时,就会导致其他服务器缓存失效,但这个操作实际上没有修改数据。

实在是不合理。可能是我们的使用方式有问题,或者有其他配置方法,请有这方面的朋友能帮助下,谢谢!

 

配置文件如下(就是标准的那个invalidationSync-service.xml文件):





<server></server>

   <classpath archives="jboss-cache.jar, jgroups.jar" codebase="./lib"></classpath>


  
  
  

   <mbean code="org.jboss.cache.CacheImpl"></mbean>          name="jboss.cache:service=TreeCache">

      <depends></depends>jboss:service=Naming
      <depends></depends>jboss:service=TransactionManager

     
      <attribute name="TransactionManagerLookupClass"></attribute>org.jboss.cache.DummyTransactionManagerLookup

     
      <attribute name="IsolationLevel"></attribute>REPEATABLE_READ

     
      <attribute name="CacheMode"></attribute>INVALIDATION_SYNC

     
      <attribute name="UseReplQueue"></attribute>false

     
      <attribute name="ReplQueueInterval"></attribute>0

     
      <attribute name="ReplQueueMaxElements"></attribute>0

     
      <attribute name="ClusterName"></attribute>JBossCache-Cluster

     
     

     
      <attribute name="ClusterConfig"></attribute>
         <config></config>
           
           
            <udp mcast_addr="228.1.2.3" mcast_port="48866"></udp>                 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 num_initial_members="3" timeout="2000"></ping>                   up_thread="false" down_thread="false"/>
            <merge2 max_interval="20000" min_interval="10000"></merge2>
           
            <fd_sock></fd_sock>
            <verify_suspect timeout="1500"></verify_suspect>                            up_thread="false" down_thread="false"/>
            <pbcast.nakack retransmit_timeout="600,1200,2400,4800" gc_lag="50"></pbcast.nakack>                            max_xmit_size="8192" up_thread="false" down_thread="false"/>
            <unicast timeout="600,1200,2400" down_thread="false"></unicast>
            <pbcast.stable desired_avg_gossip="20000"></pbcast.stable>                            up_thread="false" down_thread="false"/>
            <frag frag_size="8192"></frag>                  down_thread="false" up_thread="false"/>
            <pbcast.gms join_retry_timeout="2000" join_timeout="5000"></pbcast.gms>                         shun="true" print_local_addr="true"/>
            <pbcast.state_transfer down_thread="true" up_thread="true"></pbcast.state_transfer>
        
     


     
      <attribute name="FetchInMemoryState"></attribute>true

     
      <attribute name="InitialStateRetrievalTimeout"></attribute>15000

     
      <attribute name="SyncReplTimeout"></attribute>15000

     
      <attribute name="LockAcquisitionTimeout"></attribute>10000

     
      <attribute name="EvictionPolicyClass"></attribute>

     
      <attribute name="UseRegionBasedMarshalling"></attribute>false
  


  
  
  
  
  



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值