mysqlctl: attempt to fix MySQL replication bug#5116
mysqlctl: attempt to fix MySQL replication bug#5116derekperkins wants to merge 1 commit intovitessio:masterfrom
Conversation
|
cc @sjmudd |
02f7b58 to
27ee7fa
Compare
Signed-off-by: Derek Perkins <derek@derekperkins.com>
27ee7fa to
d9b04e8
Compare
| case err == nil: | ||
| return nil | ||
|
|
||
| case strings.ToUpper(query) == "START SLAVE" && isReplicationErr1872(err): |
There was a problem hiding this comment.
I don't think a generic "execute query" function is the right place for this specific logic. If there's not a subroutine like mysqld.StartSlave() that all the code paths you're trying to catch use, then we should add one and change the appropriate sites to use it.
Or alternatively, would it work for you if we only check for this error in the repair section of the replication health reporter? That seems safer than injecting the fix at this low level, unless for some reason the periodic repair doesn't work for your needs.
There was a problem hiding this comment.
Yeah, it felt weird to do this at this low level. I started at repairReplication and kept digging. That code path never called StartSlave that I found.
There was a problem hiding this comment.
If you're ok with only doing this check in the repairReplication code path, then we can just make sure sufficient error detail gets propagated back up to that level to detect this specific case, and put the logic there. WDYT?
There was a problem hiding this comment.
That works for me. This was just a quick stab in the dark to get some feedback.
|
I have tried to fix this at a different place in #5627 |
|
Cannot find the fix code in the branch 12.0.0, still met the issue , could u help check? |
Fixes #5067