Vladimir Davydov
authored
Currently, we always log a vinyl index creation in the vylog file synchronously, i.e. wait for the write to complete successfully. This makes any index creation a yielding operation, even if the target space is empty. To implement transactional DDL for non-yielding statements, we need to eliminate yields in this case. We can do that by simply using vy_log_try_commit() instead of vy_log_commit() for logging index creation, because we can handle a missing VY_LOG_PREPARE_INDEX record during recovery - the code was left since before commit dd0827ba ("vinyl: log new index before WAL write on DDL") which split index creation into PREPARE and COMMIT stages so all we need to do is slightly modify the test. The reason why I'm doing this now, in the series removing the schema lock, is that removal of the schema lock without making space truncation non-yielding (remember space truncation basically drops and recreates all indexes) may result in a failure while executing space.truncate() from concurrent fibers, which is rather unexpected. In particular, this is checked by engine/truncate.test.lua. So to prevent the test failure once the schema lock is removed (see the next patch), let's make empty index creation non-yielding right now.
Name | Last commit | Last update |
---|