[feature] Kafka-style retention duration for streams
There's no time-based retention right now. Data in a stream sticks around until someone trims it explicitly.
Kafka's retention.ms model is well understood and covers most use cases, so let's do the same:
- A per-stream (or per-prefix) retention duration config
- A background job that trims data past the retention window
- Trimmed ranges get cleaned up from object storage so we actually stop paying for them
Open questions:
- Default retention: infinite (current behavior) or something sane like 3-30 days?
- Do we also want size-based retention (retention.bytes) while we're in here?
- How does retention interact with the Iceberg export #11 feature, we probably shouldn't trim data that hasn't been exported yet
I would love to work on this one if it would be ok for a rust n00b!
@mchauhan3 Absolutely! assigned the issue to you. Feel free to ask any questions or collaborate on the design decisions. And here to help with any Rust related gotchas that may come along the way.
Hi @mchauhan3, no rush, but did you get a chance to work on this issue?
Hi @addu390 , sorry to lag on it -- I have been working on it, albeit very very slowly. Happy to fork it over if it's needed sooner and pick up something else!
@mchauhan3 No worries at all, just checking in.
Hi @addu390, sorry I am going to give this one up, I haven't been able to give it the time it deserves. Hopefully, I will have some time soon and will try pick up something else.
Hi @mchauhan3 No worries, thanks for getting back. I have re-assigned the issue.