Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-526

Cache clear doesn't work when passivation is enabled

    XMLWordPrintable

Details

    • ER4
    • Hide

      1) Enable passivation in cache configuration;
      2) Enable eviction and set the maxEntries value less than the number of records that you put inside the cache (for example 200);
      3) Put 400 records (it's not important the type you could use also unique strings) inside the cache;
      4) Invoke clear method of the cache object: the map size value is the original map size (400) - maxEntries (200) set in the cache configuration instead of 0;

      So for example you notice that the value of the cache.size() will be 200 and not 0 and the next invocation of the clear method produce no result. The size will be greater than 0

      Show
      1) Enable passivation in cache configuration; 2) Enable eviction and set the maxEntries value less than the number of records that you put inside the cache (for example 200); 3) Put 400 records (it's not important the type you could use also unique strings) inside the cache; 4) Invoke clear method of the cache object: the map size value is the original map size (400) - maxEntries (200) set in the cache configuration instead of 0; So for example you notice that the value of the cache.size() will be 200 and not 0 and the next invocation of the clear method produce no result. The size will be greater than 0

    Description

      Hi,
      I used the quick start https://github.com/jboss-developer/jboss-jdg-quickstarts/tree/jdg-6.6.x/helloworld-jdg to test a strange behaviour of Data Grid 6.6 used in library mode inside JBoss EAP 6.4.6.
      The clear of the map doesn’t work if the passivation is enabled: the size is never be equal to 0
      If I set the passivation to false the clear works as I expected and the result of the size method of the map is 0.

      Attachments

        Issue Links

          Activity

            People

              wburns@redhat.com Will Burns
              mvocale@redhat.com Mauro Vocale (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: