[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-5677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13891954#comment-13891954
 ] 

Damodar Reddy T commented on CLOUDSTACK-5677:
---------------------------------------------

auto_increment_increment = 10
Tells to the mysql node that auto increment values to be incremented by 10 
instead of default value 1

For Example, In a table X the last auto incremented value is 10 and the same 
will be replicated to Slave so offset on both the mysql nodes is 10 and now 
split brain occurred and MS1 is talking to DB1 and MS2 is talking to DB2 and 
both get the request to add entry to the table X. Now in DB1 the auto increment 
value will return 11 and in DB2 the auto increment value will return 20 and 
both will get synced with each other and new offset will set to 20 on both DB1 
and DB2
.
auto_increment_offset = 2
Tells to the mysql node that the starting point of the auto increment column 
value to be start with.
The second property is relevant only when split brain occurs on fresh setup.



> When split brain ocuurs DB replication fails in case of HA Enabled.
> -------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-5677
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5677
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Management Server
>    Affects Versions: 4.3.0
>            Reporter: Kiran Koneti
>            Assignee: Damodar Reddy T
>            Priority: Critical
>             Fix For: 4.3.0
>
>
> Setup and issue details:
> 1)Created a CS setup with multiple MS say MS1 and MS2 with DBHA enabled.
> 2)Created a DB replication has 2 db servers say DB1 and DB2.
> 3)Initially the setup was in such a way that both MS1 and MS2 are talking to 
> the DB1 and DB2 was acting as a slave.
> 4)Then Blocked the communication from the MS2 to DB1 using the IPtables.
> 5)now the split brain scenario is created in such a way that MS1 talks to DB1 
> and MS2 talks to DB2.
> 6)Now tried to create an affinity group in both the MS at the same time say 
> Aff1 though the MS1 and Aff2 from the MS2.
> 7)The affinity groups are created in both the MS i.e Aff1 is created in the 
> MS1 and updated in the DB1 and Aff2 is created in the MS2 and update in the 
> DB2 and the replication is broke between both the DB servers and the slave 
> status in both the DB servers is shown as below.
> Error message shown is 
> "Could not execute Write_rows event on table cloud.affinity_group; Duplicate 
> entry '1' for key 'PRIMARY', Error_code: 1062; handler error 
> HA_ERR_FOUND_DUPP_KEY; the event's master log mysql-bin.000065, end_log_pos 
> 2785854" in DB2.
> "Could not execute Write_rows event on table cloud.affinity_group; Duplicate 
> entry '1' for key 'PRIMARY', Error_code: 1062; handler error 
> HA_ERR_FOUND_DUPP_KEY; the event's master log mysql-bin.000030, end_log_pos 
> 392" in DB1.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to