一、官網(wǎng)說(shuō)明
When Group Replication is started on a server, the value of auto_increment_increment is changed to the value of group_replication_auto_increment_increment, which defaults to 7, and the value of auto_increment_offset is changed to the server ID. The changes are reverted when Group Replication is stopped. These settings avoid the selection of duplicate auto-increment values for writes on group members, which causes rollback of transactions. The default auto increment value of 7 for Group Replication represents a balance between the number of usable values and the permitted maximum size of a replication group (9 members).
為北海街道等地區(qū)用戶(hù)提供了全套網(wǎng)頁(yè)設(shè)計(jì)制作服務(wù),及北海街道網(wǎng)站建設(shè)行業(yè)解決方案。主營(yíng)業(yè)務(wù)為成都做網(wǎng)站、成都網(wǎng)站設(shè)計(jì)、北海街道網(wǎng)站設(shè)計(jì),以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專(zhuān)業(yè)、用心的態(tài)度為用戶(hù)提供真誠(chéng)的服務(wù)。我們深信只要達(dá)到每一位用戶(hù)的要求,就會(huì)得到認(rèn)可,從而選擇與我們長(zhǎng)期合作。這樣,我們也可以走得更遠(yuǎn)!
The changes are only made and reverted if auto_increment_increment and auto_increment_offset each have their default value of 1. If their values have already been modified from the default, Group Replication does not alter them. From MySQL 8.0, the system variables are also not modified when Group Replication is in single-primary mode, where only one server writes.
敲黑板,劃重點(diǎn),在MySQL8.0的版本中,組復(fù)制在單主模式下(只有一個(gè)寫(xiě)服務(wù)器),系統(tǒng)變量(自增序列參數(shù))是不會(huì)自動(dòng)修改的。這是新版本中增加的一段話(huà),我也是在測(cè)試中發(fā)現(xiàn)了了這個(gè)問(wèn)題,在官網(wǎng)中得到了證實(shí)。知識(shí)就是知識(shí)或者別人告訴你,或者你自己找答案,找答案的過(guò)程是很有意思的。
二、驗(yàn)證過(guò)程
1、系統(tǒng)默認(rèn)參數(shù)
2、自增序列表,自增是按照默認(rèn)參數(shù)自增的,并沒(méi)有修改
三、建議
1、建議大家還是用MGR中的單主模式
2、要對(duì)你要修改的每一個(gè)參數(shù)了如指掌,不然就不要改動(dòng)。
3、紙上得來(lái)終覺(jué)淺,多做測(cè)試和實(shí)驗(yàn)也要多分享。