vinyl: store run slices in metadata log
In order to recover run slices, we need to store info about them in the metadata log, so this patch introduces two new records: - VY_LOG_INSERT_SLICE: takes IDs of the slice, the range to insert the slice into, and the run the slice is for. Also, it takes the slice boundaries as after coalescing two ranges a slice inserted into the resulting range may be narrower than the range. - VY_LOG_DELETE_SLICE: takes ID of the slice to delete. Also, it renames VY_LOG_INSERT_RUN and VY_LOG_DELETE_RUN to VY_LOG_CREATE_RUN and VY_LOG_DROP_RUN. Note, we don't need to keep deleted ranges (and slices) in the log until the garbage collection wipes them away any more, because they are not needed by deleted run records, which garbage collection targets at.
Showing
- src/box/vinyl.c 108 additions, 58 deletionssrc/box/vinyl.c
- src/box/vy_log.c 317 additions, 177 deletionssrc/box/vy_log.c
- src/box/vy_log.h 69 additions, 21 deletionssrc/box/vy_log.h
- src/box/vy_run.c 3 additions, 1 deletionsrc/box/vy_run.c
- src/box/vy_run.h 7 additions, 3 deletionssrc/box/vy_run.h
- test/vinyl/layout.result 18 additions, 3 deletionstest/vinyl/layout.result
Loading
Please register or sign in to comment