mysql-mmm
mysql-mmm copied to clipboard
Lost Writer VIP After "set_online" issued when Master is Behind the Current Master
Consider a setup enviroment as below: DB1 ADMIN_OFFLINE DB2 ONLINE ( writer-vip, reader-vip )
DB1 is the preferred writer and has been OFFLINE for a long time. When "mmm control set_online DB1" is issued, writer-vip will removed before DB1 catch up with DB2. During the period when DB1 is catching up the replication lag, "writer-vip" cannnot be accessed.
In current mysql-mmm 2.2.1 , the set_online switch procedure can be summarize as below:
- remove writer-vip from DB2
- tell DB1 ONLINE
- DB1 execute start slave; Return success until catch up DB2
- attach writer-vip to DB1
During step3,the writer-vip cannot be accessed