expected
expected_nodes和recover_after_nodes参数之间的差异(Difference between expected_nodes and recover_after_nodes parameters)我看不到网关模块恢复阶段的两个参数之间的区别。
在文档中 :
gateway.recover_after_nodes设置(接受一个数字)控制多少(...)合格的节点(...)恢复将启动 。
gateway.expected_nodes允许设置集群中预计有多少(...)个符合条件的节点 ,并且一旦遇到(...)恢复开始
据我所知,一旦节点的数量等于设置的值,这两个设置就会触发恢复阶段。
为什么使用其中一个?
使用它们有什么意义?
例如 :
gateway: recover_after_nodes: 3 expected_nodes: 5在这种情况下, expected_nodes的用途是什么? 只要有3个节点就会触发恢复。 必须有另一个使用它的理由。
我希望我的问题很清楚。
提前致谢!
I can't see the difference between two parameters for the recovery phase of the gateway module.
In the documentation :
The gateway.recover_after_nodes setting (which accepts a number) controls after how many (...) eligible nodes (...) recovery will start.
The gateway.expected_nodes allows to set how many (...) eligible nodes are expected to be in the cluster, and once met, (...) recovery starts
From what I understand, these two settings trigger the recovery phase once the number of node is equal to the value set.
Why using one over the other?
And what is the point of using both of them?
For example :
gateway: recover_after_nodes: 3 expected_nodes: 5In this case, what is the purpose of expected_nodes? recovery will be triggered as soon as there will be 3 nodes. There must be another reason to use it.
I hope my question is clear enough.
Thanks in advance!
最满意答案在使用recovery_after_nodes,recover_after_data_nodes或recovery_after_master_nodes时,一旦满足所有设置条件,群集将在开始恢复之前开始等待recover_after_time:
gateway.recover_after_time设置(接受时间值)设置等待所有gateway.recover_after ...节点条件满足后才能恢复的时间。
当使用expected_nodes,expected_data_nodes或expected_master节点时,一旦满足所有条件,恢复将启动 - 群集不会等待。 另外,它也会默认recovery_after_time到5分钟。
在你的测试案例中:
gateway: recover_after_nodes: 3 expected_nodes: 5一旦你点击3个节点,一个倒数计时器开始,然后群集将在5分钟内恢复(默认),或者你点击5个节点。 基本上它允许你设置一个最小的阈值(recovery_after_nodes),并有一个超时(recovery_after_time)来等待一个期望的状态(expected_nodes)。 您将恢复recovery_after_nodes命中后的recovery_after_time或命中expected_nodes时(无需额外等待) - 以先到者为准。
When using recovery_after_nodes, recover_after_data_nodes or recovery_after_master_nodes, once all set conditions are met the cluster will then start waiting recover_after_time before starting recovery:
The gateway.recover_after_time setting (which accepts a time value) sets the time to wait till recovery happens once all gateway.recover_after...nodes conditions are met.
When using expected_nodes, expected_data_nodes or expected_master nodes, recovery will start once all conditions are met - the cluster will not wait. In addition, it will also default recovery_after_time to 5 min.
In your test case:
gateway: recover_after_nodes: 3 expected_nodes: 5Once you hit 3 nodes a countdown clock starts and the cluster will then recovery in either 5 minutes (the default) or if you hit 5 nodes. Basically it allows you to set a minimum threshold (recovery_after_nodes), with a timeout (recovery_after_time) to wait for a desired state (expected_nodes). You will either recovery recovery_after_time after recovery_after_nodes is hit, or when expected_nodes is hit (no additional waiting) - whichever comes first.