Aleksey Plekhanov created IGNITE-18439:
------------------------------------------

             Summary: Calcite engine. Expired entries are not filtered by scans
                 Key: IGNITE-18439
                 URL: https://issues.apache.org/jira/browse/IGNITE-18439
             Project: Ignite
          Issue Type: Bug
            Reporter: Aleksey Plekhanov
            Assignee: Aleksey Plekhanov


Expired entries should be filtered when it's possible (table scans, regular 
index scans). Some types of optimizations (inline scans) don't have access to 
expireTime field, perhaps we should disable these optimizations for caches with 
{{{}eagerTtl == false{}}}.
Reproducer:
{code:java}
    public void testExpiration() throws Exception {
        IgniteCache<Integer, Developer> cache = client.getOrCreateCache(new 
CacheConfiguration<Integer, Developer>()
            .setName("dev")
            .setSqlSchema("PUBLIC")
            .setIndexedTypes(Integer.class, Developer.class)
            .setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new 
Duration(TimeUnit.MILLISECONDS, 1)))
            .setEagerTtl(false)
        );
 
        for (int i = 0; i < 10; i++)
            cache.put(i, new Developer("name" + i, i));

        doSleep(100);

        assertQuery("SELECT * FROM PUBLIC.DEVELOPER").resultSize(0).check();
    }
{code}
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to