You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Tharindu Mathew <mc...@gmail.com> on 2012/03/02 11:18:25 UTC

Way to force the propagation of a schema change?

Hi everyone,

I add a column family dynamically and notice that when describe schema
versions return 2 values. Then it quickly changes back to 1. Sometimes this
stays at 2 and does not change. Then I cannot insert values to the created
column family, as it causes an exception.

Is there a way to force the schema propagation through the thrift API (not
the CLI)?

Thanks in advance.

-- 
Regards,

Tharindu

blog: http://mackiemathew.com/

Re: Way to force the propagation of a schema change?

Posted by Tamar Fraenkel <ta...@tok-media.com>.
It is my understanding that Hector does it as well (you can send true to
state you want to wait for schema agreement).

*Tamar Fraenkel *
Senior Software Engineer, TOK Media

[image: Inline image 1]

tamar@tok-media.com
Tel:   +972 2 6409736
Mob:  +972 54 8356490
Fax:   +972 2 5612956





On Fri, Mar 2, 2012 at 4:02 PM, Carlo Pires <ca...@gmail.com> wrote:

> After adding a column family you must code your app to wait until schema
> versions became 1 in the cluster to add a new row. This is something that
> must be solved in the application layer.
>
> In pycassa (python api) the system manager code already do this. I don't
> know about others clients.
>
>
> 2012/3/2 Tharindu Mathew <mc...@gmail.com>
>
>> Hi everyone,
>>
>> I add a column family dynamically and notice that when describe schema
>> versions return 2 values. Then it quickly changes back to 1. Sometimes this
>> stays at 2 and does not change. Then I cannot insert values to the created
>> column family, as it causes an exception.
>>
>> Is there a way to force the schema propagation through the thrift API
>> (not the CLI)?
>>
>> Thanks in advance.
>>
>> --
>> Regards,
>>
>> Tharindu
>>
>> blog: http://mackiemathew.com/
>>
>>
>
>
> --
>   Carlo Pires
>   62 8209-1444 TIM
>   62 3251-1383
>   Skype: carlopires
>

Re: Way to force the propagation of a schema change?

Posted by Carlo Pires <ca...@gmail.com>.
After adding a column family you must code your app to wait until schema
versions became 1 in the cluster to add a new row. This is something that
must be solved in the application layer.

In pycassa (python api) the system manager code already do this. I don't
know about others clients.

2012/3/2 Tharindu Mathew <mc...@gmail.com>

> Hi everyone,
>
> I add a column family dynamically and notice that when describe schema
> versions return 2 values. Then it quickly changes back to 1. Sometimes this
> stays at 2 and does not change. Then I cannot insert values to the created
> column family, as it causes an exception.
>
> Is there a way to force the schema propagation through the thrift API (not
> the CLI)?
>
> Thanks in advance.
>
> --
> Regards,
>
> Tharindu
>
> blog: http://mackiemathew.com/
>
>


-- 
  Carlo Pires
  62 8209-1444 TIM
  62 3251-1383
  Skype: carlopires