MaxNoOfConcurrentOperations

MaxNoOfConcurrentOperations

我已经在这里使用mysql docs设置了Mysql集群7.4,如何配置它:

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%'的全局变量和状态变量。

最佳答案

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

08-25 02:04