cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-4938) CREATE INDEX can block for creation now that schema changes may be concurrent
Date Tue, 05 May 2015 08:19:06 GMT


Sylvain Lebresne commented on CASSANDRA-4938:

bq. Can we push a "index build finished" event?

We definitively can add such new event and that's a fine idea. The one difficulty might be
however that ideally we'd want to notify once the index has been built on all (alive) nodes,
otherwise people will still get the notification, query, and not get what they expect. But
we also want all nodes to be able to generate such notification (since a client generally
register for events only against one node). Which imply non trivial synchronization and propagation
of the end of index builds.

> CREATE INDEX can block for creation now that schema changes may be concurrent
> -----------------------------------------------------------------------------
>                 Key: CASSANDRA-4938
>                 URL:
>             Project: Cassandra
>          Issue Type: Wish
>            Reporter: Krzysztof Cieslinski Cognitum
>            Assignee: Kirk True
>            Priority: Minor
>              Labels: lhf
>             Fix For: 3.x
> Response from CREATE INDEX command comes faster than the creation of secondary index.
So below code:
> {code:xml}
> CREATE INDEX ON tab(name);
> SELECT * FROM tab WHERE name = 'Chris';
> {code}
> doesn't return any rows(of course, in column family "tab", there are some records with
"name" value = 'Chris'..) and any errors ( i would expect something like ??"Bad Request: No
indexed columns present in by-columns clause with Equal operator"??) 
> Inputing some timeout between those two commands resolves the problem, so:
> {code:xml}
> CREATE INDEX ON tab(name);
> Sleep(timeout); // for column family with 2000 rows the timeout had to be set for ~1
> SELECT * FROM tab WHERE name = 'Chris';
> {code}
> will return all rows with values as specified.
> I'm using single node cluster.

This message was sent by Atlassian JIRA

View raw message