Bug #27583 | slave sql fails to read from iocache when slave got stopped at pos==4 | ||
---|---|---|---|
Submitted: | 2 Apr 2007 8:40 | Modified: | 24 Apr 2007 0:51 |
Reporter: | Andrei Elkin | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S3 (Non-critical) |
Version: | 5.1.18 | OS: | Any |
Assigned to: | Mats Kindahl | CPU Architecture: | Any |
Tags: | relay_log |
[2 Apr 2007 8:40]
Andrei Elkin
[3 Apr 2007 6:48]
Andrei Elkin
The issue with 5.0 tests does not relate. The problem occures when slave io gets interrupted with STOP SLAVE having received the first 4 bytes from master. After START SLAVE SQL_THREAD, the latter gets wrong beyond the relay log values to read from in _my_b_read(). To get to the situation: <#rep> mats, first, i found out that the alg :) to reproduce does not affect 5.0 nor 5.1 w/o bug23171 ... the alg in the following: 1. (gdb) br queue_event 2. change master ... 3. start slave; 4. (gdb) fin 5. (gdb) br Log_event::read_log_event(st_io_cache*, st_safe_mutex_t*, Format_description_log_event const*) at log_event.cc:814 6. stop slave; 7. (gdb) cont 8. start slave sql_thread 9. (gdb) watch how _my_b_read() calculates wrong pos_in_file As I There is great chance
[3 Apr 2007 8:23]
Andrei Elkin
just never mind on the last clause :)
[9 Apr 2007 16:27]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/24069 ChangeSet@1.2545, 2007-04-09 19:26:51+03:00, aelkin@dsl-hkibras1-ff1dc300-249.dhcp.inet.fi +1 -0 Bug #27583 slave sql fails to read from iocache when slave got stopped at pos==4 showed up in set of tests rpl_start_stop_slave.test, rpl_row_create_table.test, rpl000017.test as failure of slave sql thread to read from iocache when slave got stopped having read only first 4 bytes from the master binlog. Appeared to be forgotten assignment to rpl->group_relay_log_name. If the group pos is changed at that particur place a similar change should happen to the group log name in step. After the fix slave might safely stop and relay log info will consists of correct pair (relay log_name, relay log_pos). The correct relay log info is the guarantee that slave will restart w/o the problem.
[11 Apr 2007 9:10]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/24262 ChangeSet@1.2548, 2007-04-11 11:10:14+02:00, mats@romeo.(none) +1 -0 BUG#27583 (slave sql fails to read from iocache when slave got stopped at pos==4): Submitting patch on behalf of Andrei, who discovered the problem and provided the patch. An update of the group relay log coordinates when rotating forgot to update the group relay log name and only updated the group relay log position (and group master log name and position). This patch adds code to update the group relay log *name* as well as the position
[20 Apr 2007 17:16]
Bugs System
Pushed into 5.1.18-beta
[24 Apr 2007 0:51]
Paul DuBois
Noted in 5.1.18 changelog. Group relay log rotation updated only the log position and not the name, causing the slave to stop.
[20 Jun 2007 10:21]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/29176 ChangeSet@1.2494, 2007-06-20 13:21:16+03:00, aelkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi +1 -0 Bug #27583 slave sql fails to read from iocache when slave got stopped at pos==4 forgotten merge with 5.0. There can be some bugs waiting for this fix in 5.0 like Bug@29232
[21 Jun 2007 20:12]
Bugs System
Pushed into 5.0.46
[21 Jun 2007 20:14]
Bugs System
Pushed into 5.1.20-beta