Skip to content
  • Aditya A's avatar
    9c241126
    Bug #20275612 MEMCACHED INNODB PLUGIN BREAKS MYSQL ENTERPRISE BACKUP · 9c241126
    Aditya A authored
    PROBLEM
    
    Each memcached client connection takes a MDL lock which it releases only when the
    connection terminates or it switches table. Becasue of this MDL lock FLUSH TABLE
    WITH READ LOCK command hangs.
    
    FIX
    
    Introduced a internal variable called "release_mdl_lock" which will be monitored by
    background thread and set/reset by FTWRL/unlock tables; when this variable is set
    this following operations will be initiated
    
    1) Any write operation will be forced to close and then open the table using
       handler functions.Closing the table will ensure that the mdl lock are released
       and the FTWRL can obtain the global read lock. Trying to reopen the table will
       hang.The write opeartion will succeed once unlock tables is executed.
    
    2) Read operations are not forced to reopen the table, this is because we want read operations
       to continue during FTWRL.
    
    3) Background thread will detect connections which are not in use (idle) and commit transactions
       assocaited with them and close all the table handles
    9c241126
    Bug #20275612 MEMCACHED INNODB PLUGIN BREAKS MYSQL ENTERPRISE BACKUP
    Aditya A authored
    PROBLEM
    
    Each memcached client connection takes a MDL lock which it releases only when the
    connection terminates or it switches table. Becasue of this MDL lock FLUSH TABLE
    WITH READ LOCK command hangs.
    
    FIX
    
    Introduced a internal variable called "release_mdl_lock" which will be monitored by
    background thread and set/reset by FTWRL/unlock tables; when this variable is set
    this following operations will be initiated
    
    1) Any write operation will be forced to close and then open the table using
       handler functions.Closing the table will ensure that the mdl lock are released
       and the FTWRL can obtain the global read lock. Trying to reopen the table will
       hang.The write opeartion will succeed once unlock tables is executed.
    
    2) Read operations are not forced to reopen the table, this is because we want read operations
       to continue during FTWRL.
    
    3) Background thread will detect connections which are not in use (idle) and commit transactions
       assocaited with them and close all the table handles
Loading