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

SSTableReader.getPosition() does not correctly filter out queries that exceed its bounds

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • 2.1.3
    • None
    • None
    • Normal

    Description

      This has been true for some time, but I worry about including it before 2.1 in case we depend on the brokenness somehow. In getPosition, we test:

              if (first.compareTo(key) > 0 || last.compareTo(key) < 0)
              {
                  if (op == Operator.EQ && updateCacheAndStats)
                      bloomFilterTracker.addFalsePositive();
      
                  if (op.apply(1) < 0)
                  {
                      Tracing.trace("Check against min and max keys allows skipping sstable {}", descriptor.generation);
                      return null;
                  }
              }
      

      However, op.apply(1) always returns >= 0 unless op == Operation.EQ

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              benedict Benedict Elliott Smith
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: