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:25:00 UTC
[jira] [Created] (IGNITE-7401) Entry can be expired even if it
doesn't define expiry policy in "putWithPolicy-then-put" scenario
Andrey Gura created IGNITE-7401:
-----------------------------------
Summary: 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}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)