https://slatedb.io logo
It'd be pretty useful to be able to have
# general
p
It'd be pretty useful to be able to have a "compact_range" method that'd be used to tell slatedb "This range is full of tombstones, I want to reclaim this space, compact this key range". I'm running into something where if you insert a lot of keys then remove everything, it's very hard to reclaim the space. I'm not sure how this would interact with efforts to separate the compactor and Db πŸ€”
c
Ohh this is interesting. I'm starting to think about compaction requests here: https://github.com/slatedb/slatedb/issues/288 Mind adding a comment with this use case?
p
Done, copy pasted my message πŸ™‚
Yeah, I stored around 800GB of k/v
Then removed everything
And felt, "Hmmmm" πŸ˜„
c
Another interesting thing we could do once we have deletion vectors is to have the compactor just be smart about this anyway. It can look for large deletion ranges and favor compaction of those files.
Plus, we can add stats when we extract metadata to a separate file.. those stats can include number of tombstones
p
Perhaps it's naive but couldn't tombstones be stored in separate ssts?
So that it's easier to build stats about what's going on
c
This is a deletion vector πŸ˜›
p
Ah! πŸ˜„
c

https://tenor.com/FwRk.gifβ–Ύ

p
I had ZeroFS users ask me about "How to reclaim space" too, it's true that for normal users, it's not obvious why this happens and almost looks broken in a way
c
I suppose ZeroFS does a lot of deletes as blocks are overwritten/replaced?
p
I think this is not the pathological case, because this would compact away pretty quickly I think, it's more that, you have a
large_folder/
that is 100GB +
And you
rm -rf large_folder
c
ah
p
I think it'd still compact away over time, but that'll be slower than what most users would want
But now that I think about it, wouldn't some workloads be so pathological that it would result in basically permanently lost space?
(With any use of slatedb, not zerofs)
c
I suppose if workloads use a delete at the same rate the compactor compacts, there will always be some "float" of deleted tombstones
Such is life with an LSM.
p
What if there’s massive ingest, massive delete, then only slow trickle ingest there after?
c
I’d have to look at how the size tiered compaction scheduler would handle that.