Skip to content
  • Marko Mäkelä's avatar
    d762f11c
    Bug#21549928 RACE CONDITION BETWEEN FIL_NAMES_WRITE() · d762f11c
    Marko Mäkelä authored
    
    AND FIL_RENAME_TABLESPACE_IN_MEM()
    
    This is a regression from WL#7142.
    
    The tablespace file names (fil_node_t::name) were only protected by
    fil_system->mutex, but the MLOG_FILE_NAME reporting code is only holding
    log_sys->mutex. So, we have to protect the file names with both
    fil_system->mutex and log_sys->mutex. fil_system->mutex protection
    will be needed for fil_node_open_file() and possibly other users.
    
    fil_node_t::name: Document the mutex protection.
    
    fil_rename_tablespace_in_mem(): Remove.
    
    fil_rename_tablespace(): Protect fil_node_t::name by log_sys->mutex
    and fil_system->mutex. Check the validity of fil_space_t::name upfront.
    
    RB: 11014
    Reviewed-by: default avatarJimmy Yang <jimmy.yang@oracle.com>
    d762f11c
    Bug#21549928 RACE CONDITION BETWEEN FIL_NAMES_WRITE()
    Marko Mäkelä authored
    
    AND FIL_RENAME_TABLESPACE_IN_MEM()
    
    This is a regression from WL#7142.
    
    The tablespace file names (fil_node_t::name) were only protected by
    fil_system->mutex, but the MLOG_FILE_NAME reporting code is only holding
    log_sys->mutex. So, we have to protect the file names with both
    fil_system->mutex and log_sys->mutex. fil_system->mutex protection
    will be needed for fil_node_open_file() and possibly other users.
    
    fil_node_t::name: Document the mutex protection.
    
    fil_rename_tablespace_in_mem(): Remove.
    
    fil_rename_tablespace(): Protect fil_node_t::name by log_sys->mutex
    and fil_system->mutex. Check the validity of fil_space_t::name upfront.
    
    RB: 11014
    Reviewed-by: default avatarJimmy Yang <jimmy.yang@oracle.com>
Loading