You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Onur Yalazı <on...@8digits.com> on 2015/10/01 14:37:10 UTC
cqlsh strange inconsistency
Hello,
I have a table with a status field and a secondary index on that table.
Every row has 1 or -1 status values.
I have these queries run from cqlsh with the results:
consistency all;
select count(*) from table; /** 1901
Select count(*) from table where status=1; /** 27
select count(*) from table where status=-1; /** 267
This is really strange. If I select status from the table, I see 1901
rows with status 1 or -1.
I rebuild the index and the results did not change. But If I update
every row with the correct status value, cassandra starts reporting
correct counts.
What is happening? How can this situation happen? Do you have any ideas?
Cassandra version: 2.1.3
cqlsh version: 4.1.1
Re: cqlsh strange inconsistency
Posted by Robert Coli <rc...@eventbrite.com>.
On Thu, Oct 1, 2015 at 5:37 AM, Onur Yalazı <on...@8digits.com> wrote:
> What is happening? How can this situation happen? Do you have any ideas?
...
> This is really strange. If I select status from the table, I see 1901
> rows with status 1 or -1.
I rebuild the index and the results did not change. But If I update every
> row with the correct status value, cassandra starts reporting correct
> counts.
There is an endless trickle of such issues with secondary indexes. This is
one of the reasons I do not personally recommend their use.
If you have a repro test case, file it at issues.apache.org and let the
list know the issue URL?
=Rob