Skip to content
  • Hemant Dangi's avatar
    081932e4
    Bug#25609945: GR SHOULD BLOCK OPERATIONS ON NON-COMPLAINT TABLES IN GR+ASYNC SETUP · 081932e4
    Hemant Dangi authored
    Bug#25828806: GR ALLOWS OPERATIONS ON NON-COMPLAINT TABLES THROUGH MYSQLBINLOG
    
    PROBLEM STATEMENT:
    ==================
    We have few restrictions in GR such as:
    1. operations on a table without PK is not allowed when running group
    replication.
    2. only operations on table with innodb storage engine is supported with GR
    3. If a table has foreign key with a CASCADE clause, then operations on
    such table is not allowed (in multi-primary mode)
    
    But GR allows all these operations through asynchrnous replication and
    mysqlbinlog utility when the operations are based on RBR events.
    
            GR                Async
    M2 <------------> M1 <--------------M3
                    slave              master
    
    SOLUTION:
    =========
    A new hook (applier_log_event) is created to validate if a binary log
    event should be applied or not. GR plugin on initialization subscribes
    to this hook and using its validation logic ensures that all its requirements
    are fulfilled.
    
    Rows_log_event::do_apply_event() is now calling all the observer functions,
    subscribed to this hook (applier_log_event), after opening and locking the
    tables to be updated. This allows GR to verify if the tables are in compliance
    with its requisites.
    081932e4
    Bug#25609945: GR SHOULD BLOCK OPERATIONS ON NON-COMPLAINT TABLES IN GR+ASYNC SETUP
    Hemant Dangi authored
    Bug#25828806: GR ALLOWS OPERATIONS ON NON-COMPLAINT TABLES THROUGH MYSQLBINLOG
    
    PROBLEM STATEMENT:
    ==================
    We have few restrictions in GR such as:
    1. operations on a table without PK is not allowed when running group
    replication.
    2. only operations on table with innodb storage engine is supported with GR
    3. If a table has foreign key with a CASCADE clause, then operations on
    such table is not allowed (in multi-primary mode)
    
    But GR allows all these operations through asynchrnous replication and
    mysqlbinlog utility when the operations are based on RBR events.
    
            GR                Async
    M2 <------------> M1 <--------------M3
                    slave              master
    
    SOLUTION:
    =========
    A new hook (applier_log_event) is created to validate if a binary log
    event should be applied or not. GR plugin on initialization subscribes
    to this hook and using its validation logic ensures that all its requirements
    are fulfilled.
    
    Rows_log_event::do_apply_event() is now calling all the observer functions,
    subscribed to this hook (applier_log_event), after opening and locking the
    tables to be updated. This allows GR to verify if the tables are in compliance
    with its requisites.
Loading