Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-7401

Entry can be expired even if it doesn't define expiry policy in "putWithPolicy-then-put" scenario

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Entry can be expired even if it doesn't define expiry policy in "putWithPolicy-then-put" scenario. The following test case demonstrate the problem.

          public void testPutWithTtlThenPut() throws Exception {
              Ignite ignite = startGrid();
      
              try {
                  IgniteCache<Object, Object> cache = ignite.cache("cache");
      
                  CreatedExpiryPolicy expiryPlc = new CreatedExpiryPolicy(new Duration(TimeUnit.MILLISECONDS, 10));
      
                  IgniteCache<Object, Object> cacheTtl = cache.withExpiryPolicy(expiryPlc);
      
                  cacheTtl.put("key", "v1");
                  cache.put("key", "v2");
      
                  U.sleep(10);
      
                  assertEquals("v2", cache.get("key")); // Will fail (flaky)
              }
              finally {
                  stopAllGrids();
              }
          }
      

      The issue also affects Ignite based cluster manager for Vert.x: https://github.com/vert-x3/vertx-ignite/issues/63

      Attachments

        Activity

          People

            Unassigned Unassigned
            agura Andrey N. Gura
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: