Fix binlogrouter deadlock on reconnect

The master reconnection in the binlogrouter used the housekeeper
recursively. This is no longer supported and the delayed worker call
mechanism should be used in its stead.
This commit is contained in:
Markus Mäkelä
2018-08-29 11:03:51 +03:00
parent 54dca0963a
commit 178d31af27
3 changed files with 21 additions and 73 deletions

View File

@ -292,7 +292,7 @@ bool blr_handle_one_event(MXS_ROUTER* instance, REP_HEADER& hdr, uint8_t* ptr, u
if (blr_write_binlog_record(router, &hdr, len - offset, ptr + offset) == 0)
{
blr_master_close(router);
blr_master_delayed_connect(router);
blr_start_master_in_main(router);
return false;
}
@ -302,7 +302,7 @@ bool blr_handle_one_event(MXS_ROUTER* instance, REP_HEADER& hdr, uint8_t* ptr, u
if (!blr_rotate_event(router, ptr + offset, &hdr))
{
blr_master_close(router);
blr_master_delayed_connect(router);
blr_start_master_in_main(router);
return false;
}
}
@ -429,7 +429,7 @@ bool blr_handle_one_event(MXS_ROUTER* instance, REP_HEADER& hdr, uint8_t* ptr, u
if (!blr_handle_fake_rotate(router, &hdr, ptr))
{
blr_master_close(router);
blr_master_delayed_connect(router);
blr_start_master_in_main(router);
return false;
}