我建立了一个 5 个节点的 crateDB 集群。情况如下:
(
number_of_replicas
即为2,wait_for_active_shards
即为all)当一个节点宕机时,写入过程会报错:Not enough active copies to meet shard count of [ALL](有2个,需要3个)。(这个
number_of_replicas
是“0-4”,这个wait_for_active_shards
是“全部”)当一个下来,一切都好。但是在恢复过程中,写入过程会报错:Not enough active copies to meet shard count of [ALL](有4个,需要5个)。
那么,如何设置wait_for_active_shards
或number_of_replicas
以确保至少有一个节点关闭时不会影响集群和写入过程?
PS 有没有什么公式可以计算这个参数的值
"wait_for_active_shards" like "int( (primary + number_of_replicas) / 2 ) + 1" ?