You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Victor Blaga <vi...@gmail.com> on 2012/05/25 13:32:55 UTC

Schema changes not getting picked up from different process

Hi all,

This is my first message on this posting list so I'm sorry if I am breaking
any rules. I just wanted to report some sort of a problem that I'm having
with Cassandra.
Short version of my problem: if I make changes to the schema from within a
process, they do not get picked up by the other processes that are
connected to the Cassandra cluster unless I trigger a reconnect.

Long version:

Process 1: cassandra-cli connected to cluster and keyspace
Process 2: cassandra-cli connected to cluster and keyspace

>From within process 1 - create column family test;
>From within process 2 - describe test; - fails with an error (other
query/insert methods fail as well).

I'm not sure if this is indeed a bug or just a misunderstanding from my
part.

Regards,
Victor

Re: Schema changes not getting picked up from different process

Posted by aaron morton <aa...@thelastpickle.com>.
What clients are the scripts using ? This sounds like something that should be handled in the client. 

I would worry about holding a long running connection to a single node. There are several situations where the correct behaviour for a client is to kill a connection and connect to another node. 

Cheers

-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com

On 26/05/2012, at 12:11 AM, Victor Blaga wrote:

> Hi Dave,
> 
> Thank you for your answer.
> 
> 2012/5/25 Dave Brosius <db...@mebigfatguy.com>
> What version are you using?
> 
> I am using version 1.1.0
>  
> It might be related to https://issues.apache.org/jira/browse/CASSANDRA-4052
>  
>  Indeed the Issue you suggested goes into the direction of my problem. However, things are a little bit more complex. I used the cassandra-cli just for this example, although I'm getting this behavior from other clients (I'm using python and ruby scripts). Basically I'm modifying the schema through the ruby script and I'm trying to query and insert data through the python script. Both of the scripts are meant to be on forever (sort of daemons) and thus they establish once at start a connection to the Cassandra which is kept alive.
> 
> I can see from the comments on the issue that keeping a long-lived connection to the Cluster might not be ideal and it would probably be better to reconnect upon executing a set of queries.


Re: Schema changes not getting picked up from different process

Posted by Victor Blaga <vi...@gmail.com>.
Hi Dave,

Thank you for your answer.

2012/5/25 Dave Brosius <db...@mebigfatguy.com>

>  What version are you using?
>

I am using version 1.1.0


> It might be related to
> https://issues.apache.org/jira/browse/CASSANDRA-4052
>

 Indeed the Issue you suggested goes into the direction of my problem.
However, things are a little bit more complex. I used the cassandra-cli
just for this example, although I'm getting this behavior from other
clients (I'm using python and ruby scripts). Basically I'm modifying the
schema through the ruby script and I'm trying to query and insert data
through the python script. Both of the scripts are meant to be on forever
(sort of daemons) and thus they establish once at start a connection to the
Cassandra which is kept alive.

I can see from the comments on the issue that keeping a long-lived
connection to the Cluster might not be ideal and it would probably be
better to reconnect upon executing a set of queries.

Re: Schema changes not getting picked up from different process

Posted by Dave Brosius <db...@mebigfatguy.com>.
What version are you using?

It might be related to https://issues.apache.org/jira/browse/CASSANDRA-4052

On 05/25/2012 07:32 AM, Victor Blaga wrote:
> Hi all,
>
> This is my first message on this posting list so I'm sorry if I am 
> breaking any rules. I just wanted to report some sort of a problem 
> that I'm having with Cassandra.
> Short version of my problem: if I make changes to the schema from 
> within a process, they do not get picked up by the other processes 
> that are connected to the Cassandra cluster unless I trigger a reconnect.
>
> Long version:
>
> Process 1: cassandra-cli connected to cluster and keyspace
> Process 2: cassandra-cli connected to cluster and keyspace
>
> From within process 1 - create column family test;
> From within process 2 - describe test; - fails with an error (other 
> query/insert methods fail as well).
>
> I'm not sure if this is indeed a bug or just a misunderstanding from 
> my part.
>
> Regards,
> Victor