-
Notifications
You must be signed in to change notification settings - Fork 937
clusterMaster.SelfBinlogCoordinates might not be the latest binlog after set read_only #1213
Comments
I'm not sure I understand the question.
orchestrator/go/logic/topology_recovery.go Lines 1963 to 1967 in d219844
We do get the latest binlog coordinates after On an unrelated note, I suspect you run |
pt-heartbeat's user doesn't have super privilege, you can see as follows
clusterMaster is set at the beginning of function GracefulMasterTakeover, It seems that clusterMaster is got before read_only is set, I'm not sure whether i totally understand the code, could help me confirm the logical. |
Yes, "We do get the latest binlog coordinates after read_only is set." |
Do you i will try the general_log, do you have any other clue ? |
You have the details of the binary log name and position. Can you look into the binary log to see what statement was executed? |
I have another shell script which is doing replace sql forever in order to see the impact while graceful-master-takeover-auto is done.
#!/bin/bash
while true
do
mysqlhost=$1
mysqlport=$2
mysqluser="sbtest"
mysqlpswd="FDKVu4XIjw"
current=`date`
#output=$(mysql -hali-mysql2tidb-care-master -upmm -P3306 -ppmm@cvte -e "select @@hostname")
output=$(mysql -h ${mysqlhost} -P ${mysqlport} -u${mysqluser} -p"${mysqlpswd}" -NB -e "select @@hostname,@@port,@@read_only" 2>/dev/null )
echo $output
output=$(mysql -h ${mysqlhost} -P ${mysqlport} -u${mysqluser} -p"${mysqlpswd}" -NB sbtest -e "select id,pad from sbtest1 where id=1" 2>/dev/null )
echo $output
output=$(mysql -h ${mysqlhost} -P ${mysqlport} -u${mysqluser} -p"${mysqlpswd}" -NB sbtest -e "replace into sbtest1 (id, pad) values (1,\"${current}\")" 2>/dev/null )
echo $output
echo
sleep 1
done |
As you can see the output of shellscript, there is another chance set read_only back to false;
|
It's changed by my mysql-operator orchestrator controller, which is used to inspect the topology of mysql cluster, and the writable status. Thanks @shlomi-noach |
ah, cool. Out of curiosity, do you have a link to that |
presslabs/mysql-operator, I develop new feature sbasing on the project. New features are discussed in bitpoke/mysql-operator#562. I hope someone can discuss with me as early as possible. But the discussion is very slow. |
The issue is very clear, i gonna close it. If someone has any question, reopen it. |
orchestrator/go/logic/topology_recovery.go
Line 1967 in d219844
The BinlogCoordinates might not be latest,then the designatedInstance just catch up with clusterMaster.SelfBinlogCoordinates, so cluster master has different gtids with the designatedInstance;
for example:
`` `
2020-07-22 08:34:20 ERROR GracefulMasterTakeover: sanity problem. Demoted master's coordinates changed from mysql-bin.000106:1176521 to mysql-bin.000106:1177259 while supposed to have been frozen
The text was updated successfully, but these errors were encountered: