CQL2 and CQL3 indexes are not compatible. I guess CQL2 is able to detect that the table was defined in CQL3 probably should not allow it. Backwards comparability is something the storage engines and interfaces have to account for. At least they should prevent you from hurting yourself.

But do not try to defeat the system. Just stick with one CQL version.

On Tue, Dec 18, 2012 at 7:37 AM, Abhijit Chanda <abhijit.chanda0@gmail.com> wrote:
I was trying to mix CQL2 and CQL3 to check whether a columnfamily with compound keys can be further indexed. Because using CQL3 secondary indexing on table with composite PRIMARY KEY is not possible. And surprisingly by mixing the CQL versions i was able to do so. But when i want to insert anything in the column family it gives me a rpc_timeout exception. I personally found it quite abnormal, so thought of posting this thing in forum.


On Mon, Dec 10, 2012 at 6:29 PM, Sylvain Lebresne <sylvain@datastax.com> wrote:
On Mon, Dec 10, 2012 at 12:36 PM, Abhijit Chanda <abhijit.chanda0@gmail.com> wrote:
Hi All,

I have a column family which structure is

CREATE TABLE practice (
  id text,
  name text,
  addr text,
  pin text,
  PRIMARY KEY (id, name)
  comment='' AND
  caching='KEYS_ONLY' AND
  read_repair_chance=0.100000 AND
  gc_grace_seconds=864000 AND
  replicate_on_write='true' AND
  compaction_strategy_class='SizeTieredCompactionStrategy' AND

CREATE INDEX idx_address ON practice (addr);

Initially i have made the column family using CQL 3.0.0. Then for creating the index i have used CQL 2.0.

Now when want to insert any data in the column family it always shows  a timeout exception.
INSERT INTO practice (id, name, addr,pin) VALUES ( '1','AB','kolkata','700052');
Request did not complete within rpc_timeout.

Please suggest me where i am getting wrong?

That would be creating the index through CQL 2. Why did you use CQL 3 for the CF creation
and CQL 2 for the index one? If you do both in CQL 3, that should work as expected.

That being said, you should probably not get timeouts (that won't do what you want though).
If you look at the server log, do you have an exception there?


Abhijit Chanda
VeHere Interactive Pvt. Ltd.