3 Replies Latest reply on Jan 12, 2012 9:45 AM by nfilotto

    distributed cache, L1 and rehashing

    pmancham

      I am using clustering mode = DIST_SYNC. With 3 hotrod servers, when I insert some keys, I see an error on console - "Could not lock key ..  in order to invalidate from L1 at node.." I wanted to disable L1 and see if that works, but, when I disabled L1 I see another error that rehashing needs L1 to be enabled. I want to disable rehasing and see if that works, but, my question is can we have distributed cache without rehashing - If the client is using consistent hashing..?

        • 1. Re: distributed cache, L1 and rehashing
          pmancham

          For some reason, even when I give rehashEnabled="false" it still complains about needing L1 for rehashing! Anyhow, if anyone else come across "Could not lock key ..  in order to invalidate from L1 at node.." and you are using jgroups-tcp.xml then try setting invalidationThreashold="-1" on L1 cache settings. It worked for me.

           

          I would still like to know how the cache.get() works when we disable L1 & disable rehashing (if we can) and use distribution mode for clustering.

          • 2. Re: distributed cache, L1 and rehashing
            galder.zamarreno

            What Infinispan version are you using? I dunno about that error message in particular, but I'd suggest trying latest Infinispan 5.1.0.CR2 and see if it's still present.

             

            The problem with disabling rehashing is that if a node goes down, the data is not rebalanced, so the moment N nodes go down where N is higher or equals to the number of owners, then you're risking losing data. Rehashing makes sure the number of copies for data is maintained even when nodes go down.

            • 3. Re: distributed cache, L1 and rehashing
              nfilotto

              I face the same issue and I confirm that in tcp with invalidationThreshold set to -1, I don't get the warning anymore so thanks for the tip however I don't thing that it is related. About the issue that you meet maybe it is the same issue as this https://issues.jboss.org/browse/ISPN-1706, I faced the same kind of issue when I tried to disable the L1 Cache because of the same warning message aka "Could not lock key...".