Cassandra:并发模式更改的解决 [英] Cassandra: Resolution of concurrent schema changes
问题描述
我无法找到Cassandra如何处理其模式的并发更改的信息。例如:
I have been unable to find information on how Cassandra handles concurrent changes to its schema. For example:
在Cassandra集群中,使用机器A,B,C,D,E
In Cassandra cluster with machines A,B,C,D,E
到机器A:
CREATE TABLE foo (
id_column int,
x_column1 varchar,
x_column2 varchar,
PRIMARY KEY (id_column)
)
机器B
CREATE TABLE foo (
id_column int,
y_another_column1 varchar,
y_another_column2 varchar,
PRIMARY KEY (id_column)
)
会发生什么?它失败了吗?最后的结果是两者的合并吗?如果是合并,如果已经选择了diff PKs列,那么它会失败吗?
What happens? Does it fail? Is the final result a merge of both? If it is a merge, would it fail if diff PKs columns had been chosen?
我猜测并发创建冲突模式是一种不寻常的情况。然而,发出并发ALTER TABLE语句需要类似的解析度,并且在现实世界的情况下更有可能。
I guess concurrent creation of conflicting schema is an unusual scenario. However issuing concurrent ALTER TABLE statements would need similar resolution and that more likely in a real world scenario.
推荐答案
2 JIRA ticket(已解决)提供有关实时模式更改和冲突解决的详细信息:
The following 2 posts and 2 JIRA tickets (resolved) provide details about live schema changes and conflict resolution:
- 实时模式更新( nb :版本适用于功能首次可用)
- Cassandra 1.1中的模式管理复兴。
- 允许并发模式迁移(1391)(固定为C * 1.1)
- 避免ID来自并发模式更改的冲突(3794)(在C * 1.2中固定)
- Live schema updates (nb: the version applies to when this feature was firstly available)
- The schema management renaissance in Cassandra 1.1.
- Allow concurrent schema migrations (1391) (fixed in C* 1.1)
- Avoid ID conflicts from concurrent schema changes (3794) (fixed in C* 1.2)
CASSANDRA-1391 中的评论,以获取所有详细信息。
You'll have to go through the comments in CASSANDRA-1391 to get all the details.
这篇关于Cassandra:并发模式更改的解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!