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