You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey Gura (JIRA)" <ji...@apache.org> on 2018/01/12 16:26:00 UTC

[jira] [Updated] (IGNITE-7401) Entry can be expired even if it doesn't define expiry policy in "putWithPolicy-then-put" scenario

     [ https://issues.apache.org/jira/browse/IGNITE-7401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Gura updated IGNITE-7401:
--------------------------------
    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.

{code:java}
    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")); // Fill fail (flaky)
        }
        finally {
            stopAllGrids();
        }
    }
{code}

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

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

{code:java}
    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")); // Fill fail (flaky)
        }
        finally {
            stopAllGrids();
        }
    }
{code}


> Entry can be expired even if it doesn't define expiry policy in "putWithPolicy-then-put" scenario
> -------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-7401
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7401
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Andrey Gura
>
> Entry can be expired even if it doesn't define expiry policy in "putWithPolicy-then-put" scenario. The following test case demonstrate the problem.
> {code:java}
>     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")); // Fill fail (flaky)
>         }
>         finally {
>             stopAllGrids();
>         }
>     }
> {code}
> The issue also affects Ignite based cluster manager for Vert.x: https://github.com/vert-x3/vertx-ignite/issues/63



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)