You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Evgeniy Rudenko (JIRA)" <ji...@apache.org> on 2019/07/16 08:32:00 UTC

[jira] [Resolved] (IGNITE-11917) Row count [select count(*) from table] not matching with the actual row count present in the table

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

Evgeniy Rudenko resolved IGNITE-11917.
--------------------------------------
       Resolution: Duplicate
         Assignee:     (was: Evgeniy Rudenko)
    Fix Version/s: 2.8

Dup of IGNITE-11438, will be fixed in Ignite 2.8

> Row count [select count(*) from table] not matching with the actual row count present in the table 
> ---------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-11917
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11917
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.7
>            Reporter: shivakumar
>            Priority: Major
>             Fix For: 2.8
>
>
> To reproduce, create a sample table using JDBC endpoint:
> {code}
> CREATE TABLE person(Id VARCHAR, birthTime TIMESTAMP, name VARCHAR, PRIMARY KEY(Id)) WITH "TEMPLATE=templateEternal,CACHE_NAME=person, KEY_TYPE=personKey,VALUE_TYPE=person";
> {code} 
> and configure cache expiry policy as below 
> {code}
> <property name="cacheConfiguration">
>  <list>
>  <bean id="cache-template-bean" abstract="true" class="org.apache.ignite.configuration.CacheConfiguration">
>  <property name="name" value="templateEternal*"/>
>  <property name="cacheMode" value="PARTITIONED"/>
>  <property name="backups" value="1"/>
>  <property name="groupName" value="groupEternal"/>
>  <property name="expiryPolicyFactory">
>  <bean class="javax.cache.expiry.CreatedExpiryPolicy" factory-method="factoryOf">
>  <constructor-arg>
>  <bean class="javax.cache.expiry.Duration">
>  <constructor-arg value="SECONDS"/>
>  <constructor-arg value="600"/>
>  </bean>
>  </constructor-arg>
>  </bean>
>  </property>
>  </bean>
>  </list>
>  </property>
> {code}
> with above cache configuration records will start expiring at the end of 10 minute, batch insert around 10000 records to the table and after 10 minute records will start expiring but after some time check the records count [select count(*) from person] most of the time it will show some non zero number but if rows are selected instead of count to see the actual data with [select * from person]  there will be zero rows.
> why count is not becoming zero even though there is no data (rows) in the table ?
>  
> {code}
> 0: jdbc:ignite:thin://10.*.*.*:10800> select count(*) from person;
>  +--------------------------------+
> |COUNT(*)|
> +--------------------------------+
> |70|
> +--------------------------------+
>  1 row selected (0.004 seconds)
>  0: jdbc:ignite:thin://10.*.*.*:10800> select * from person;
>  +----------------------------------+------------------------------+++----------------------------------------------------------------+---------------------------------
> |ID|BIRTHTIME|NAME|
> +----------------------------------+------------------------------+++----------------------------------------------------------------+---------------------------------
>  +----------------------------------+------------------------------+++----------------------------------------------------------------+---------------------------------
>  No rows selected (0.015 seconds)
>  0: jdbc:ignite:thin://10.*.*.*:10800>
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)