https://slatedb.io logo
Welcome @William! These are all good
# general
a
Welcome @William! These are all good suggestions. 1. multi-get. I don't think this is on the roadmap, but I like the idea! I don't see why we wouldn't support it 2. SSTs track the creation timestamp for each row and SST Ids are ULIDs, which encode the timestamp in them (Of the 128-bits, the first 48 are a unix timestamp in milliseconds.) Was that your question? 3. By size do you mean number of entries or bytes size? How would you like this exposed? 4. The last_key is typically deduced from first_key of the next SST -- I think we use that in some places (I can try to dig up the code). UPDATE: can't find this code... maybe someone else can find it! 5. The SST table creation/delation triggers a manfiest change, which triggers the compaction scheduler to run a loop (I need to confirm this, but I'm pretty sure it works this way... UPDATE: confirmed). Is there anything in particular you were looking for? You can always implement your own compaction scheduler. 6. API for manual compaction triggers is actively in the works! See RFC-13 for compaction persistence 7. Not sure about checksums/compression -- I need to double check that Would love to hear more about how you're planning on using slate, most of these suggestions seem totally reasonable for us to implement
c
(4) has come up a few times. I think Sujeet mentioned it while he was working on stateful compaction. Might be nice to have a GH issue on this one (even if we opt not to implement)
(7) we can support this, but don't currently. It's hard-coded to 3. I think it should be easy enough to change
CompressionCodec::Zstd
to
CompressionCodec::Zstd(u16)
. @William Mind opening a GH issue for this?
For (7), I ended up digging into this. Totally do-able, but it breaks configuration serialization if we do the way I like (
CompressionCodec::Zstd(i32)
). We can get around this by implementing a custom to/from str that does something like
zstd:7
to define a zstd level 7 compression. But it gets a bit yucky. I'm not convinced the complexity is worth the value of this. There are of course other approaches (e.g. a specific config attribute that's just for zstd .. "zstd_level" or something). Or an environment variable. But IMO this all violates CLEAN_SLATE.md
So I think (7) is a no-go for now unless there's a really compelling reason.
a
Alternatively for compression we could have
CompressionCodec::Zstd1
,
Zstd3
, etc... (a few hard coded options) as part of the main
CompressionCodec
config if it's really a big deal
c
🤦‍♂️ this is a much better idea lol
a
😅 I liked your
CompressionCodec::Zstd(u16)
design in theory
c
Same.. it did not survive first contact with reality tho 🙁