Hello, I created https://issues.apache.org/jira/browse/CASSANDRA-7766 about that
Fabrice LARCHER 2014-08-13 14:58 GMT+02:00 DuyHai Doan <doanduy...@gmail.com>: > Hello Fabrice. > > A quick hint, try to create your secondary index WITHOUT the "IF NOT > EXISTS" clause to see if you still have the bug. > > Another idea is to activate query tracing on client side to see what's > going on underneath. > > > On Wed, Aug 13, 2014 at 2:48 PM, Fabrice Larcher < > fabrice.larc...@level5.fr> wrote: > >> Hello, >> >> I have used C* 2.1.0-rc1, 2.1.0-rc2, 2.1.0-rc3 and I currently use >> 2.1.0-rc5. Since 2.1.0-rc2, it appears that the secondary indexes are not >> always working. Just after the INSERT of a row, the index seems to be >> there. But after a while (I do not know when or why), SELECT statements >> based on any secondary index do not return the corresponding row(s) >> anymore. I noticed that a restart of C* may have an impact (the data >> inserted before the restart may be seen through the index, even if it was >> not returned before the restart). >> >> Here is a use-case example (in order to clarify my request) : >> >> CREATE TABLE IF NOT EXISTS ks.cf ( k int PRIMARY KEY, ind ascii, value >> text); >> CREATE INDEX IF NOT EXISTS ks_cf_index ON ks.cf(ind); >> INSERT INTO ks.cf (k, ind, value) VALUES (1, 'toto', 'Hello'); >> SELECT * FROM ks.cf WHERE ind = 'toto'; // Returns no result after a >> while >> >> The last SELECT statement may or may not return a row depending on the >> instant of the request. I experienced that with 2.1.0-rc5 through CQLSH >> with clusters of one and two nodes. Since it depends on the instant of the >> request, I am not able to deliver any way to reproduce that systematically >> (It appears to be linked with some scheduled job inside C*). >> >> Is anyone working on this issue ? >> Am I possibly missing some configuration that prevent secondary indexes >> to return empty result ? >> Should I rather create a new table for each secondary index and remove >> secondary indexes ? >> >> Many thanks for your support. >> >> Fabrice >> >> >