vinyl: remove vylog newer than snap in casual recovery
As a follow-up to the previous patch, let's check also emptiness of the vylog being removed. During vylog rotation all entries are squashed (e.g. "delete range" annihilates "insert range"), written to the new vylog and at the end of new vylog SNAPSHOT marker is placed. If the last entry in the vylog is SNAPSHOT, we can safely remove it without hesitation. So it is OK to remove it even during casual recovery process. However, if it contains rows after SNAPSHOT marker, removal of vylog may cause data loss. In this case we still can remove it only in force_recovery mode. Follow-up #5823
Showing
- src/box/vy_log.c 51 additions, 1 deletionsrc/box/vy_log.c
- test/vinyl/gh-5823-crash_snapshot.lua 1 addition, 3 deletionstest/vinyl/gh-5823-crash_snapshot.lua
- test/vinyl/gh-5823-skip-newer-than-snap-vylog.result 1 addition, 35 deletionstest/vinyl/gh-5823-skip-newer-than-snap-vylog.result
- test/vinyl/gh-5823-skip-newer-than-snap-vylog.test.lua 1 addition, 8 deletionstest/vinyl/gh-5823-skip-newer-than-snap-vylog.test.lua
Loading
Please register or sign in to comment