Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-11398

Missing results when merging from SASI index sources

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Not A Problem
    • Fix Version/s: None
    • Component/s: Feature/SASI
    • Labels:
      None
    • Severity:
      Normal

      Description

      There seems to be a problem in QueryPlan.ResultIterator or RangeIterator when merging results from mulitple index locations. I've only repro'd using a prefix index on a clustering column, but in that case it seems to manifest whenever the search results are drawn from > 1 index, either multiple sstable indexes or a combination of memtable and sstable indexes).

      Note, the following repro case is masked by CASSANDRA-11397, so the patch attached to that issue needs to be applied to expose this.

      cqlsh> create table ks.t1 (k text, c1 text, c2 text, c3 text, v text, primary key (k,c1,c2,c3));
      cqlsh> create custom index on ks.t1(c2) using 'org.apache.cassandra.index.sasi.SASIIndex';
      cqlsh> insert into ks.t1(k, c1, c2, c3, v) values ('a', 'ba', 'ca', 'da', 'va');
      cqlsh> select * from ks.t1 where c1 = 'ba' and c2 like 'c%' and c3 = 'da' allow filtering;
      
       k | c1 | c2 | c3 | v
      ---+----+----+----+----
       a | ba | ca | da | va
      
      (1 rows)
      
      # flush 
      
      cqlsh> insert into ks.t1(k, c1, c2, c3, v) values ('a', 'ba', 'ca', 'db', 'va');
      cqlsh> select * from ks.t1 where c1 = 'ba' and c2 like 'c%' and c3 = 'da' allow filtering;
      
       k | c1 | c2 | c3 | v
      ---+----+----+----+---
      
      (0 rows)
      
      # flush again 
      
      cqlsh> select * from ks.t1 where c1 = 'ba' and c2 like 'c%' and c3 = 'da' allow filtering;
      
       k | c1 | c2 | c3 | v
      ---+----+----+----+---
      
      (0 rows)
      
      # compact
      
      cqlsh> select * from ks.t1 where c1 = 'ba' and c2 like 'c%' and c3 = 'da' allow filtering;
      
       k | c1 | c2 | c3 | v
      ---+----+----+----+----
       a | ba | ca | da | va
      
      (1 rows)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              samt Sam Tunnicliffe
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: