On Wednesday, August 14, 2019 9:31:44 PM MSK Ilya Kosarev wrote: Hi, thanks for you patch! Please see my comments below >... > #include "gc.h" > +#include "wal.h" This breaks encapsulation and logic - a wal isn't the object the engine interacts with. > > /* sync snapshot every 16MB */ >... > > - if (!memtx->force_recovery) { > + if (!memtx->force_recovery && wal_dir_lock >= 0) { The same mistake, it isn't a memtx deal - is there any wal dir and was it locked or not. >... /* I pushed different solution onto your branch, please investigate it. Also there should be some tests I think.