cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross Black (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-14242) Indexed static column returns inconsistent results
Date Tue, 20 Feb 2018 03:26:00 GMT
Ross Black created CASSANDRA-14242:

             Summary: Indexed static column returns inconsistent results
                 Key: CASSANDRA-14242
             Project: Cassandra
          Issue Type: Bug
         Environment: Cassandra 3.11.2

Java driver 3.4.0

Ubuntu - 4.4.0-112-generic
            Reporter: Ross Black

I am using Cassandra 3.11.2, and the Java driver 3.4.0

I have a table that has a static column, where the static column has a secondary index.
When querying the table I get incomplete or duplicated results, depending on the fetch size.

CREATE KEYSPACE hack WITH replication = {'class': 'SimpleStrategy', 'replication_factor':
CREATE TABLE hack.stuff (id int, kind text, chunk int static, val1 int, PRIMARY KEY (id, kind));
CREATE INDEX stuff_chunk_index ON hack.stuff (chunk);{code}

-- repeat with thousands of values for id =>
  INSERT INTO hack.stuff (id, chunk, kind, val1 ) VALUES (${id}, 777, 'A', 123);{code}

Querying from Java:
    final SimpleStatement statement = new SimpleStatement("SELECT id, kind, val1 FROM hack.stuff
WHERE chunk = " + chunk); 
    final ResultSet resultSet = connection.getSession().execute(statement);
    for (Row row : resultSet) {
        final int id = row.getInt("id");

*The number of results returned depends on the fetch-size.*

e.g. For 30k values inserted, I get the following:

In production, I have a much larger table where the correct result size for a specific chunk
is 20019, but some fetch sizes will return _significantly fewer_ results.
||fetch-size||result-size|| ||
|25000|20019| |
|5000|9999|*<== this one is has far fewer results*|
|5001|20026| |

(so far been unable to reproduce this with the simpler test table)


This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message