Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-12777

Incorrect query result with count(*) should return 0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • 2.8, 2.7.5, 2.7.6
    • None
    • sql
    • None
    • Docs Required, Release Notes Required

    Description

      Query on cache with parallelism > 1 will result in incorrect result;

      add

       

      xml
      <property name="cacheConfiguration">
                   <list>
                        <bean class="org.apache.ignite.configuration.CacheConfiguration" name="parallelTemplate">
                            <property name="name" value="parallelTemplate*"/>
                            <property name="queryParallelism" value="9"/>
                            <property name="backups" value="1"/>
                            <property name="cacheMode">
                                <value type="org.apache.ignite.cache.CacheMode">PARTITIONED</value>
                            </property>
                            <property name="atomicityMode" value="TRANSACTIONAL_SNAPSHOT"/>
                            <property name="queryDetailMetricsSize" value="1024"/>
                        </bean>
                   </list>
               </property>

      to default-config.xml
      and create a table in sqlline

      sql
      create table test3
      (
      ID BIGINT default 0 not null,
      C1 VARCHAR(100) default '' not null,
      C2 VARCHAR(32) default '' not null,
      C3 DECIMAL(10,2) default 0.00 not null,
      C4 TIMESTAMP,
      C5 TIMESTAMP,
      C6 VARCHAR(10) default '' not null,
      primary key (C1, C2)
      ) with "template=parallelTemplate,affinity_key=c1" ;

       

      execute query:

       

      sql
      select count from test3
      where C1 = 'CESHIZJBX_7789'
      and C2 = '12345'
      and C3 = 12.5;

      Results in incorrent result:

       

      sqlline version 1.3.0
      0: jdbc:ignite:thin://127.0.0.1> create table test3
      . . . . . . . . . . . . . . . .> (
      . . . . . . . . . . . . . . . .> ID BIGINT default 0 not null,
      . . . . . . . . . . . . . . . .> C1 VARCHAR(100) default '' not null,
      . . . . . . . . . . . . . . . .> C2 VARCHAR(32) default '' not null,
      . . . . . . . . . . . . . . . .> C3 DECIMAL(10,2) default 0.00 not null,
      . . . . . . . . . . . . . . . .> C4 TIMESTAMP,
      . . . . . . . . . . . . . . . .> C5 TIMESTAMP,
      . . . . . . . . . . . . . . . .> C6 VARCHAR(10) default '' not null,
      . . . . . . . . . . . . . . . .> primary key (C1, C2)
      . . . . . . . . . . . . . . . .> ) with "template=parallelTemplate,affinity_key=c1" ;
      No rows affected (0.239 seconds)
      0: jdbc:ignite:thin://127.0.0.1> select count from test3
      . . . . . . . . . . . . . . . .> where C1 = 'CESHIZJBX_7789'
      . . . . . . . . . . . . . . . .> and C2 = '12345'
      . . . . . . . . . . . . . . . .> and C3 = 12.5;
      --------------------------------

      COUNT

      --------------------------------

      0
      0
      0
      0
      0
      0
      0
      0
      0

      --------------------------------
      9 rows selected (0.052 seconds)

       
       
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            yiteng yiteng.liu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: