Skip to content
  • Libing Song's avatar
    1949d8cd
    WL#10956 Binlog Access API - Step3 Relaylog Applier Reader · 1949d8cd
    Libing Song authored
    This patch replaced the last Log_event::read_log_event() call to
    Relaylog_file_reader which was introduced in Step2 patch. So
    Log_event::read_log_event() was finally removed from the code.
    
    It also did some refacotring
    - It created Rpl_applier_reader class which is responsible for reading
      events from relaylog files.
    - The code of next_event was moved into Rpl_applier_reader class and
      separated into a few functions.
    - The applier reader is only need when applier is online. It is used
      as a local variable of handle_slave_sql().
    - change_master and purge_relay_logs don't need to reopen or reinitialize
      the applier read anymore. So rli::init_relay_log_pos is reorganized as
      group_relay_log_is_valid() to verify group_relay_log_name existing.
    - rli::event_relay_log_pos and rli::event_relay_log_name are only used
      when applying events. So they just need to be intilaized in Rpl_applier_reader
      class.
    - Moved the code period checking out mts_checkpoint_routine. It was
      encapsulated into a new function called rli::is_time_for_mts_checkpoint
    1949d8cd
    WL#10956 Binlog Access API - Step3 Relaylog Applier Reader
    Libing Song authored
    This patch replaced the last Log_event::read_log_event() call to
    Relaylog_file_reader which was introduced in Step2 patch. So
    Log_event::read_log_event() was finally removed from the code.
    
    It also did some refacotring
    - It created Rpl_applier_reader class which is responsible for reading
      events from relaylog files.
    - The code of next_event was moved into Rpl_applier_reader class and
      separated into a few functions.
    - The applier reader is only need when applier is online. It is used
      as a local variable of handle_slave_sql().
    - change_master and purge_relay_logs don't need to reopen or reinitialize
      the applier read anymore. So rli::init_relay_log_pos is reorganized as
      group_relay_log_is_valid() to verify group_relay_log_name existing.
    - rli::event_relay_log_pos and rli::event_relay_log_name are only used
      when applying events. So they just need to be intilaized in Rpl_applier_reader
      class.
    - Moved the code period checking out mts_checkpoint_routine. It was
      encapsulated into a new function called rli::is_time_for_mts_checkpoint
Loading