MDEV-30209 Race condition between fil_node_open_file() and renaming files
mtr_t::commit_file(): Protect the rename operation with fil_system.mutex like we used to do before commit 2e43af69 in order to prevent fil_node_open_file() from running concurrently. In other words, fil_system.mutex will protect the consistency of fil_node_t::name and the file name in the file system. This race condition should be very hard to trigger. We would need a low value of innodb_open_files or table_cache limit so that fil_space_t::try_to_close() will be invoked frequently. Simultaneously with a RENAME operation, something (such as a write of a data page) would have to try to open the file.
Showing
Please register or sign in to comment