如何在MySQL Cluster中使用选项Arbitrtaion = WaitExternal?

时间:2017-07-21 03:07:09

标签: mysql high-availability

我正在阅读MySQL参考手册并注意到有一个NDB配置选项 - Arbitrtaion = WaitExternal。问题是如何使用此选项以及如何实现外部集群管理器?

The Arbitration parameter also makes it possible to configure arbitration in
such a way that the cluster waits until after the time determined by Arbitrat- 
ionTimeout has passed for an external cluster manager application to perform 
arbitration instead of handling arbitration internally. This can be done by 
setting Arbitration = WaitExternal in the [ndbd default] section of the config.ini
file. For best results with the WaitExternal setting, it is recommended that
ArbitrationTimeout be 2 times as long as the interval required by the external 
cluster manager to perform arbitration.

1 个答案:

答案 0 :(得分:0)

一些git注释和一些原始设计文档的搜索说明如下:

当仲裁员即将向仲裁员发送仲裁消息时,它将发出以下日志消息:

  • case ArbitCode :: WinWaitExternal:{
  • char buf [8 * 4 * 2 + 1];
  • SD-> mask.getText(BUF);
  • BaseString :: snprintf(m_text,m_text_len,
  • “等待外部仲裁后继续”,
  • “nodes:%s”,buf);
  • 中断;
  • }

所以,例如 等待外部仲裁后继续,节点:1,2

外部集群件应检查此消息 与ArbitrationTimeout处于相同的间隔。 当它发现此消息时,外部群集 应该杀死它决定丢失的数据节点 仲裁。

NDB数据节点会注意到这个kill 决定哪个节点要生存。