The following functions enable you to inspect and configure the maximum number of consensus instances that a group can execute in parallel.以下函数使您能够检查和配置组可以并行执行的最大一致性实例数。
group_replication_get_write_concurrency()
Check the maximum number of consensus instances that a group can execute in parallel.检查组可以并行执行的一致性实例的最大数量。
Syntax:语法:
INT group_replication_get_write_concurrency()
This function has no parameters.此函数没有参数。
Return value:返回值:
The maximum number of consensus instances currently set for the group.当前为组设置的最大共识实例数。
Example:例子:
SELECT group_replication_get_write_concurrency()
For more information, see Section 18.5.1.3, “Using Group Replication Group Write Consensus”.有关更多信息,请参阅第18.5.1.3节,“使用组复制组写入共识”。
group_replication_set_write_concurrency()
Configures the maximum number of consensus instances that a group can execute in parallel. 配置组可以并行执行的最大一致性实例数。The 使用此功能需要GROUP_REPLICATION_ADMIN
privilege is required to use this function.GROUP_REPLICATION_ADMIN
权限。
Syntax:语法:
STRING group_replication_set_write_concurrency(instances
)
Arguments:参数:
members
: Sets the maximum number of consensus instances that a group can execute in parallel. :设置组可以并行执行的最大一致实例数。Default value is 10, valid values are integers in the range of 10 to 200.默认值为10,有效值为10到200之间的整数。
Return value:返回值:
Any resulting error as a string.作为字符串的任何结果错误。
Example:例子:
SELECT group_replication_set_write_concurrency(instances
);
For more information, see Section 18.5.1.3, “Using Group Replication Group Write Consensus”.有关更多信息,请参阅第18.5.1.3节,“使用组复制组写入共识”。