vinyl: fix unwritten mem dropped if ddl
Since commit ba08c2a9 ("vinyl: rotate mem on ddl"), in-memory trees can be rotated not only by dump/compaction tasks, but also by tx commit, in case a DDL happened after the mem was created. Dump/compaction tasks are unprepared for this - they always drop all frozen in-memory trees. As a result, in case of DDL in the middle of dump/compaction execution, an in-memory tree can be complete lost along with all its statements. To fix this, let's count the number of trees we are actually dumping and only delete them upon task completion.
Loading
Please register or sign in to comment