• Marko Mäkelä's avatar
    Revert "MDEV-24589 DROP TABLE is not crash-safe" · 1636db54
    Marko Mäkelä authored
    This reverts commit e731a283.
    
    A crash occurred during the test stress.ddl_innodb when
    fil_delete_tablespace() for DROP TABLE was waiting in
    fil_check_pending_operations() and a purge thread for handling
    an earlier DROP INDEX was attempting to load the index root page
    in btr_free_if_exists() and btr_free_root_check(). The function
    buf_page_get_gen() would write out several times
    "trying to read...being-dropped tablespace"
    before giving up and committing suicide.
    
    It turns out that during any page access in btr_free_if_exists(),
    fil_space_t::set_stopping() could have been invoked by
    fil_check_pending_operations(), as part of dropping the tablespace.
    Preventing this race condition would require extensive changes
    to the allocation code or some locking mechanism that would ensure
    that we only set the flag if btr_free_if_exists() is not in progress.
    
    Either way, that could be a too risky change in a GA release.
    Because MDEV-24589 is not strictly necessary in the 10.5 release
    series and it only is a requirement for MDEV-25180 in a later
    major release, we will revert the change from 10.5.
    1636db54
row0purge.cc 33.2 KB