https://slatedb.io logo
If I write many time the same key before
# general
p
If I write many time the same key before a flush with WAL disabled, are all the versions written to l0s or just the last one?
a
at the moment they're all written with different sequence numbers and then compacted together later. I am debating whether we should bound it in the memtable as well though cc @flaneur233
(by bound it I mean when we flush to L0 check the min snapshot sequence number and filter out those below that)
let me double check to make sure whether we already do that
p
That’d be a very nice improvement for my workload
It seems like it’s something that most people would want
a
Yeah I confirmed we don't do that, but I think we totally should. We even already have the
RetentionIterator
, I think we should just apply that (as well as the
MergeOperatorIterator
) when we flush to L0
yeah, we need multiple copies for snapshot isolation on reads, but if you're not using transactions then the snapshot seq advances very quickly
p
My use case is that I am storing 256k data chunks with a bunch of metadata on each write with the same keys, so for a single write I’d waste 5-6 duplicated keys + the updated data key if the previous write was partial
That kind of destroys throughput
a
yeah yikes! definitely not what we want for your use case. let me open a ticket for it
p
@almog Is that somewhat trivial to implement from your understanding?
a
It should be, though I'm not super familiar around the txn protocol so I'd like some of the other committers ( @criccomini @Rohan @flaneur233 ) to chime in first
c
@almog left a reference in the GH issue to an older discussion with @flaneur233 and @dmvk