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.
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.Best,On Mon, Dec 10, 2012 at 6:29 PM, Sylvain Lebresne <firstname.lastname@example.org> wrote:
On Mon, Dec 10, 2012 at 12:36 PM, Abhijit Chanda <email@example.com> wrote:
Hi All,I have a column family which structure isCREATE TABLE practice (id text,name text,addr text,pin text,PRIMARY KEY (id, name)) WITHcomment='' ANDcaching='KEYS_ONLY' ANDread_repair_chance=0.100000 ANDgc_grace_seconds=864000 ANDreplicate_on_write='true' ANDcompaction_strategy_class='SizeTieredCompactionStrategy' ANDcompression_parameters:sstable_compression='SnappyCompressor';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 creationand 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?--Sylvain--
VeHere Interactive Pvt. Ltd.