Bug #78107 | Make I/O thread report the SQL commands that fail to help debugging. | ||
---|---|---|---|
Submitted: | 17 Aug 2015 14:41 | Modified: | 4 Nov 2015 12:51 |
Reporter: | Simon Mudd (OCA) | Email Updates: | |
Status: | Open | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S4 (Feature request) |
Version: | 5.7.8,5.6.27 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | bug#77732 |
[17 Aug 2015 14:41]
Simon Mudd
[4 Nov 2015 12:45]
Simon Mudd
A similar isssue seen in 5.6.27 shows the following snippet: (1) 2015-11-04 12:02:10 37036 [Note] Slave SQL thread initialized, starting replication in log 'binlog.012345' at position 81906155, relay log '../log/relaylog.000001' position: 4 (2) 2015-11-04 12:02:10 37036 [Note] Slave I/O thread: connected to master 'some_user@some-host.example.com:3306',replication started in log 'binlog.012345' at position 81906155 (3) 2015-11-04 12:21:08 37036 [ERROR] Error reading packet from server: ...<error message from upstream master removed as not appropriate> You see in lines (1) and (2) that the I/O and SQL threads start at the indicated position. That's good. For (3) you see an error message from the "server". You notice: (a) no message that the connection to the server was dropped and (b) no message that the connection to the master was re-attempted AND successful. So please add a line of logging for (a) and (b) so we can track the state changes in a slave more completely. Maybe this leads to slightly more logging but given disconnections are usually infrequent I do not see an issue in that, and the more complete logging helps debugging connection problems with a master.
[4 Nov 2015 12:47]
Simon Mudd
Note: I know from the master logging that the connection WAS dropped and the slave DID connect again. This is not visible in the logging shown. The message as it stands make it looks like the error came from the existing master connection and as far as I'm aware that did not happen.
[4 Nov 2015 12:51]
Simon Mudd
Hm. Perhaps I should file this as a separate request. I'll do that. sorry for putting inappropriate content here, even if it's related.