Skip to content
Snippets Groups Projects
Commit d716f54f authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Konstantin Osipov
Browse files

vinyl: count number of slices per run

Currently, there can't be more than one slice per run, but this will
change one the single memory level is introduced. Then we will have to
count the number of slices per each run so as not to unaccount the same
run more than once on each slice deletion. Unfortunately, we can't use
vy_run->refs to count the number of slices created per each run,
because, although vy_run->refs is only incremented per each slice
allocated for the run, this includes slices that were removed from
ranges and stay allocated only because of being pinned by open
iterators. So we add one more counter to vy_run, slice_count, and
introduce new helpers to be used for slice creation/destruction,
vy_run_make_slice() and vy_run_destroy_slice(), which inc/dec the
counter.
parent 09d56944
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment