Vladimir Davydov
authored
Since range->mem can be rotated while dump is in progress, we have to remember which mems we are dumping. Commit 818208c4 ("vinyl: fix unwritten mem dropped if ddl") does this by remembering the number of frozen mems at the time of dump preparation on the dump task. Currently, this works fine, because we always dump all frozen mems. However, this condition won't hold when consistent snapshot is introduced. The point is that in order to make snapshot consistent, we need to dump only in-memory trees which were created before WAL checkpoint during snapshot. These mems are not even guaranteed to be at the end of the range->frozen list because of range coalescing. So in this patch we use the current LSN to remember which mems are going to be dumped - all mems created after task dump was created will have min_lsn > LSN of task creation, so we should delete only mems with min_lsn <= the LSN on task completion.
Name | Last commit | Last update |
---|