Skip to content
  • Vitor Oliveira's avatar
    d2d4b667
    WL#9556 - Writeset-based MTS dependency tracking on master · d2d4b667
    Vitor Oliveira authored
    This worklog introduces the ability to use transaction write sets to
    find out which transactions can be safely executed concurrently on the
    slave. The transactions are tracked on the master and the binary log
    commit_parent field, which is used by the MTS applier on the slave, is
    changed to consider writeset dependencies between transactions.
    
    Relevant changes to the code:
    - introduces two new options: binlog-transaction-dependency-tracking,
      which selects the tracking mode between COMMIT_ORDER, WRITESET and
      WRITESET_SESSION, and binlog-transaction-dependency-history-size.
    - adds the Transaction_dependency_tracker and associated classes
      Commit_order_trx_dependency_tracker, Writeset_trx_dependency_tracker
      and Writeset_session_trx_dependency_tracker, specific to each of the
      tracking modes (in the new rpl_trx_tracking.h/.cc files).
    - to support the WRITESET mode, the hashes of each row touched by a
      transaction are stored in the m_writeset_history map, up to the size
      determined by the binlog-transaction-dependency-history-size option.
    - to support the WRITESET_SESSION mode, the Dependency_tracker_ctx is
      added to the THD so that the last sequence_number used by a client is
      available for future transactions of the same session.
    - extends the function add_pke to track transactions that touch tables
      with primary keys and tables without them, so that partial writesets
      are detected.
    d2d4b667
    WL#9556 - Writeset-based MTS dependency tracking on master
    Vitor Oliveira authored
    This worklog introduces the ability to use transaction write sets to
    find out which transactions can be safely executed concurrently on the
    slave. The transactions are tracked on the master and the binary log
    commit_parent field, which is used by the MTS applier on the slave, is
    changed to consider writeset dependencies between transactions.
    
    Relevant changes to the code:
    - introduces two new options: binlog-transaction-dependency-tracking,
      which selects the tracking mode between COMMIT_ORDER, WRITESET and
      WRITESET_SESSION, and binlog-transaction-dependency-history-size.
    - adds the Transaction_dependency_tracker and associated classes
      Commit_order_trx_dependency_tracker, Writeset_trx_dependency_tracker
      and Writeset_session_trx_dependency_tracker, specific to each of the
      tracking modes (in the new rpl_trx_tracking.h/.cc files).
    - to support the WRITESET mode, the hashes of each row touched by a
      transaction are stored in the m_writeset_history map, up to the size
      determined by the binlog-transaction-dependency-history-size option.
    - to support the WRITESET_SESSION mode, the Dependency_tracker_ctx is
      added to the THD so that the last sequence_number used by a client is
      available for future transactions of the same session.
    - extends the function add_pke to track transactions that touch tables
      with primary keys and tables without them, so that partial writesets
      are detected.
Loading