【问题标题】:MySQL cluster parameter issue and MaxNoOfConcurrentOperationsMySQL集群参数问题和MaxNoOfConcurrentOperations
【发布时间】:2015-03-27 11:53:17
【问题描述】:

我已经设置了一个 Mysql 集群 7.4,这里的 mysql 文档是如何配置的:

cat /var/lib/mysql-cluster/config.ini                                [ndbd default]
# Options affecting ndbd processes on all data nodes:
NoOfReplicas=2    # Number of replicas
DataMemory=20G    # How much memory to allocate for data storage
IndexMemory=5G    # How much memory to allocate for index storage
                  # For DataMemory and IndexMemory, we have used the
                  # default values. Since the "world" database takes up
                  # only about 500KB, this should be more than enough for
                  # this example Cluster setup.

[tcp default]
# TCP/IP options:
portnumber=2202   # This the default; however, you can use any
                  # port that is free for all the hosts in the cluster
                  # Note: It is recommended that you do not specify the port
                  # number at all and simply allow the default value to be used
                  # instead

[ndb_mgmd]
# Management process options:
hostname=10.107.16.97           # Hostname or IP address of MGM node
datadir=/var/lib/mysql-cluster  # Directory for MGM node log files


[ndbd]
# Options for data node "Node1":
                                # (one [ndbd] section per data node)
hostname=10.107.16.241          # Hostname or IP address
datadir=/usr/local/mysql/data   # Directory for this data node's data files
MaxNoOfConcurrentOperations=3865470336
MaxNoOfLocalOperations=4294967039

[ndbd]
# Options for data node "Node2":
hostname=10.107.16.242          # Hostname or IP address
datadir=/usr/local/mysql/data   # Directory for this data node's data files
MaxNoOfConcurrentOperations=3865470336
MaxNoOfLocalOperations=4294967039

[ndbd]
# Options for data node "Node3":
                                # (one [ndbd] section per data node)
hostname=10.107.16.243          # Hostname or IP address
datadir=/usr/local/mysql/data   # Directory for this data node's data files
MaxNoOfConcurrentOperations=3865470336
MaxNoOfLocalOperations=4294967039
[ndbd]
# Options for data node "Node4":
hostname=10.107.16.244          # Hostname or IP address
datadir=/usr/local/mysql/data   # Directory for this data node's data files
MaxNoOfConcurrentOperations=3865470336
MaxNoOfLocalOperations=4294967039

[mysqld]
# SQL node options:
hostname=10.107.16.80           # Hostname or IP address
                                # (additional mysqld connections can be
                                # specified for this node for various
                                # purposes such as running ndb_restore)

这里是 mgm 节点中的 show 命令:

ndb_mgm> show
#Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     4 node(s)
id=2    @10.107.16.241  (mysql-5.6.23 ndb-7.4.4, Nodegroup: 0, *)
id=3    @10.107.16.242  (mysql-5.6.23 ndb-7.4.4, Nodegroup: 0)
id=4    @10.107.16.243  (mysql-5.6.23 ndb-7.4.4, Nodegroup: 1)
id=5    @10.107.16.244  (mysql-5.6.23 ndb-7.4.4, Nodegroup: 1)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @10.107.16.97  (mysql-5.6.23 ndb-7.4.4)

[mysqld(API)]   1 node(s)
id=6    @10.107.16.80  (mysql-5.6.23 ndb-7.4.4)

我想通过插入选择将一些数据推送到表 order_history 但我仍然收到错误

CREATE TABLE `order_history` (
  `id` int(11) NOT NULL,
  `comment` varchar(255) NOT NULL DEFAULT '',
  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `lastupdated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` int(11) NOT NULL DEFAULT '0',
  `order_id` int(11) NOT NULL DEFAULT '0',
  `status` varchar(255) NOT NULL DEFAULT '',
  `meta` text NOT NULL,
  KEY `order_history_order_id_i` (`order_id`),
  KEY `order_history_lastupdated_i` (`lastupdated`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=8

mysql> select count(*) from order_history; ### 32k

mysql> insert into order_history (select * from order_history);
ERROR 1297 (HY000): Got temporary error 233 'Out of operation records in transaction coordinator (increase MaxNoOfConcurrentOperations)' from NDBCLUSTER

为了修复这个错误,我将 MaxNoOfConcurrentOperations 添加到配置文件中,然后我重新启动了它,但它似乎没有采用新的参数值。

你知道如何查看集群中的ndb参数吗?我没有在 NDBINFO Db 的任何表中找到任何这些值,并且我已经通过所有全局变量和状态变量,例如 '%ndb%'。

【问题讨论】:

    标签: mysql concurrency parameters cluster-computing


    【解决方案1】:

    MaxNoOfConcurrentOperations 应该写在[ndbd default] 部分。停止管理节点,然后用--initial重新启动它

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-04-26
      • 1970-01-01
      • 1970-01-01
      • 2014-04-15
      • 1970-01-01
      • 1970-01-01
      • 2019-01-07
      • 1970-01-01
      相关资源
      最近更新 更多