如下函數使您可以檢查和配置組能夠並行執行的最大一致性實例數。html
● group_replication_get_write_concurrency()mysql
檢查組能夠並行執行的一致性實例的最大數量。sql
語法:ide
INT group_replication_get_write_concurrency()
此函數沒有參數。函數
返回值:code
當前爲組設置的最大一致性實例數。htm
示例:字符串
SELECT group_replication_get_write_concurrency()
● group_replication_set_write_concurrency()get
配置組能夠並行執行的最大一致性實例數。要使用此UDF,須要 GROUP_REPLICATION_ADMIN 權限。it
語法:
STRING group_replication_set_write_concurrency(instances)
參數:
● members:設置組能夠並行執行的一致性實例的最大數量。默認值爲10,有效值爲10到200之間的整數。
返回值:
以字符串形式出現的任何錯誤。
示例:
SELECT group_replication_set_write_concurrency(instances);
官方網址:
https://dev.mysql.com/doc/refman/8.0/en/group-replication-functions-for-maximum-consensus.html