cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 鄢来琼 <laiqiong....@gtafe.com>
Subject Re: Is Table created in all the nodes if the default consistency level used
Date Mon, 16 Mar 2015 07:13:57 GMT
Hi Daemeon,

Yes, I use “NetworkTopologyStrategy” strategy for “Table_test”,
but “System keyspace” is Cassandra internal keyspace, its strategy is localStrategy.
So my question is how to guarantee “Table_test” is created in all the nodes before any
R/W opertions?

Thanks.

Peter


发件人: daemeon reiydelle [mailto:daemeonr@gmail.com]
发送时间: 2015年3月16日 14:35
收件人: user@cassandra.apache.org
主题: Re: Is Table created in all the nodes if the default consistency level used

If you want to guarantee that the data is written to all nodes before the code returns, then
yes you have to use "consistency all". Otherwise there is a small risk of outdated data being
served if a node goes offline longer than hints timeouts.
Somewhat looser options that can assure multiple copies are written, as you probably know,
are quorum or a hard coded value. This applies to a typical installation with a substantial
number of nodes of course, not a small 2-3 node cluster.
I am curious why localStrategy when you have such concerns about data consistency that you
want to assure all nodes get data written. Can you elaborate on your use case?


.......
“Life should not be a journey to the grave with the intention of arriving safely in a
pretty and well preserved body, but rather to skid in broadside in a cloud of smoke,
thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!”
- Hunter Thompson

Daemeon C.M. Reiydelle
USA (+1) 415.501.0198
London (+44) (0) 20 8144 9872

On Sun, Mar 15, 2015 at 8:11 PM, 鄢来琼 <laiqiong.yan@gtafe.com<mailto:laiqiong.yan@gtafe.com>>
wrote:
Could you tell me whether the meta data of the new table are build in all the nodes after
execute the following statement.

cassandra_session.execute_async(

“““CREATE TABLE Table_test(

      ID uuid,

      Time timestamp,

      Value double,

      Date timestamp,

      PRIMARY KEY ((ID,Date), Time)

) WITH COMPACT STORAGE;
”””
)

As I know, the system keyspace is used to store the meta data, but the strategy is localStrategy,
which only store meta data of local node.
So I want to know whether table is created in all the nodes, should I add consistency_level
setting to the above statement to make sure
“create table” will be executed in all the nodes?
Thanks.

Peter


Mime
View raw message