添加新数据中心时用于系统模式的 Cassandra 复制

Cassandra replication for system schemas, when adding new datacenter

Cassandra 的官方 documentation 说:

Configure the keyspace and create the new datacenter:

Use ALTER KEYSPACE to use the NetworkTopologyStrategy for the following keyspaces:

  • All user-created
  • system: system_distributed and system_traces
  • system_auth and dse_security, see Configuring system_auth and dse_security keyspace replication.

This step is required for multiple datacenter clusters because nodetool rebuild (10) requires a replica of these keyspaces in the specified source datacenter.

我了解系统密钥空间保存特定于节点的信息,因此无法与其他节点共享。

system_schema键空间呢?

基于documentation它包含关于用户定义

的信息

还有

我的猜测是所有这些也应该在数据中心之间复制,但我有点怀疑为什么文档中根本没有提到它?

system_schema 键空间(以及 system)具有 LocalStrategy 作为复制策略 - 在这种情况下,所有更改仅应用于当前节点。通过八卦检测模式之间的差异,并触发数据更新过程。

您不应更改这些键空间的复制。

2020年更新。您可以使用 https://github.com/DataStax-Toolkit/cassandra-dse-helper-scripts/tree/master/adjust-keyspaces 自动调整所有必要的键空间