7 Replies Latest reply on Jan 24, 2012 3:50 PM by triathlon98

    Passivated data not cleared when clearing the cache

    triathlon98

      I am using Infinispan 4.2.

       

      I have a cache configuration which passivated the data to a jdbm store.

       

      However, when I clear the cache, and then get objects from the cache again, it seems that the data is still available.

       

      Do I need to do something special to assure the passivated data is also cleared when the cache itself is cleared?

       

      Thanks for the help,

      Joachim

        • 1. Re: Passivated data not cleared when clearing the cache
          galder.zamarreno

          Hmmm, weird. Clear should be clearing all data from the attached cache store. Can you try with Infinispan 5.1.0.CR4 (our latest release) to see if the issue is still present?

          • 2. Re: Passivated data not cleared when clearing the cache
            triathlon98

            Unfortunately moving to Infinispan 5 given me problems as the configuration has changed.

             

            I tried debugging and see that visitClearCommand is called in CacheStoreInterceptor. This in turn calls clear() in JdbmCacheStore. However, this changed state does not seem to be persisted to disk.

            I have tried waiting a little after the clear (to allow any async acrions if needed), but that does not seem to make a difference. Do I need to flush the cache in some way8 If so, how?

             

            Thanks for your time.

             

            Kind regards,

            Joachim

            • 3. Re: Passivated data not cleared when clearing the cache
              redlab

              Hi Joachim,

               

              the pain of upgrading the configuration is worth the numerous fixes that have happened!

               

               

              and in addition, it's coming closer towards a real jsr 107 implementation which gives you more freedom

              • 4. Re: Passivated data not cleared when clearing the cache
                galder.zamarreno

                Can you give us a bit more context on how this clear is being called? Is it within a tx? If so, are you making sure you commit the transaction?

                • 5. Re: Passivated data not cleared when clearing the cache
                  triathlon98

                  This is a junit test, non-transactional.

                  I call a method twice, checking that the first time the data is put in the cache, and obtained from cache the second time round.

                  To reset the state, I clear the cache at the end, simple calling clear() on the cache.

                   

                  Joachim

                  • 6. Re: Passivated data not cleared when clearing the cache
                    galder.zamarreno

                    Weird, might be a bug in the JDBM version used in that Infinispan version. I just run a quick test on the latest Infinispan which uses:

                     

                          <dependency>
                             <!-- Contains fixes not officially released by JDBM group -->
                             <groupId>org.apache.directory.server</groupId>
                             <artifactId>apacheds-jdbm</artifactId>
                             <version>1.5.7</version>
                             <exclusions>
                                <exclusion>
                                   <groupId>org.apache.directory.shared</groupId>
                                   <artifactId>shared-ldap</artifactId>
                                </exclusion>
                                <exclusion>
                                   <groupId>org.slf4j</groupId>
                                   <artifactId>slf4j-api</artifactId>
                                </exclusion>
                             </exclusions>
                          </dependency>
                    

                     

                    And it works fine...

                    • 7. Re: Passivated data not cleared when clearing the cache
                      triathlon98

                      I have upgraded everything to Infinispan 5.1.RC4 and it now works.

                      Thanks for all the help.

                       

                      Kind regards,

                      Joachim