Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-649

Caches in TERMINATED mode should not allow put or any modifications

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.0.ALPHA2, 4.2.0.Final
    • 4.0.0.Final, 4.1.0.Final, 4.2.0.ALPHA1
    • Core
    • None

      Seems like it's JIRA time this week...

      Anyway, Infinispan allows local put operations to succeed on caches whose status is TERMINATED:

      The following test fails for the wrong reasons:

      Cache cache = cacheManager.getCache();
      cache.put("k", "v");
      cache.stop();
      Cache cache2 = cacheManager.getCache();
      cache2.put("k", "v2");
      assert "v2".equals(cache2.get("k"));
      assert cache2.getStatus() == ComponentStatus.RUNNING : "Cache should be running, but it's not, it's status is" + cache2.getStatus();

      It fails cos the status is TERMINATED. However, if you look closely you'll see that a put for v2 was allowed after cache was stopped and that the value put was retrieved in the get after it.

      This came from building a unit test to replicate http://opensource.atlassian.com/projects/hibernate/browse/HHH-5563

              rh-ee-galder Galder ZamarreƱo
              rh-ee-galder Galder ZamarreƱo
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: