0

我建立了一个 5 个节点的 crateDB 集群。情况如下:

  1. number_of_replicas即为2,wait_for_active_shards即为all)当一个节点宕机时,写入过程会报错:Not enough active copies to meet shard count of [ALL](有2个,需要3个)。

  2. (这个number_of_replicas是“0-4”,这个wait_for_active_shards是“全部”)当一个下来,一切都好。但是在恢复过程中,写入过程会报错:Not enough active copies to meet shard count of [ALL](有4个,需要5个)。

那么,如何设置wait_for_active_shardsnumber_of_replicas以确保至少有一个节点关闭时不会影响集群和写入过程?

PS 有没有什么公式可以计算这个参数的值

"wait_for_active_shards" like "int( (primary + number_of_replicas) / 2 ) + 1" ?
4

1 回答 1

0

将数量设置wait_for_active_shardsnumber_of_replicas. 在此处查看我们的文档:https ://crate.io/docs/crate/reference/en/latest/sql/statements/create-table.html#write-wait-for-active-shards

于 2018-10-11T20:08:45.657 回答