kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

[OSPP 2025] Tracking issues: Support time series data structure and commands

Open yezhizi opened this issue 5 months ago • 9 comments

Search before asking

  • [x] I had searched in the issues and found no similar issues.

Motivation

Part of OSPP 2025. This task is to implement the time series data structure and its commands on Kvrocks.

We have broken down the task into multiple subtasks and will track them in this issue.

  • [x] Initialize metadata. (#3072)

  • [x] Write Operations(TS.CREATE/TS.ADD/TS.MADD): Support uncompressed chunk storage. (#3091 #3107 )

  • [x] Query Operations(TS.INFO/TS.GET/TS.RANGE): Implement time-range scans with chunk iteration. (#3133 #3140 #3142 )

  • [x] Multi-Series Queries(TS.MGET/TS.MRANGE): Support label-based indexing and filter expressions. (#3164 #3167 )

  • [x] Downsampling Rules(TS.CREATERULE): Implement downstream_key metadata and aggregation logic. (#3151 )

  • [x] Remove/recycle related label index in Index CF when a TS key was deleted/expired. (#3175 )

  • [x] Retention: Implement retention policy with compaction filters. (#3177 )

  • [x] Deletion & Other Write Commands(TS.DEL, TS.INCRBY/DECRBY): Support deleting a range of time series data. (#3171 #3174 )

  • [ ] (Optional) Compressed Chunk Support: Integrate Gorilla compression for timestamps/values.

Solution

No response

Are you willing to submit a PR?

  • [x] I'm willing to submit a PR!

yezhizi avatar Jul 10 '25 04:07 yezhizi

Proposal can be found here: https://github.com/apache/kvrocks/discussions/3044

PragmaTwice avatar Jul 10 '25 05:07 PragmaTwice

Hi @yezhizi ,

Thanks for your effort! 😊 When these tasks are ready for the community to participate, we'd better list the dependencies of each sub-task. It will help us to pick up the available tasks first and work in the expected order in your plan.

Best Regards, Edward

LindaSummer avatar Jul 18 '25 09:07 LindaSummer

Hi! @LindaSummer

Thank you for the reminder. Since this is an OSPP 2025 project, according to the project requirements, most of the functional code needs to be completed independently by me and will take around three months. I’ve already started working on this (progress might be slow at first because I’m quite busy during this days). So this tracking issue is being used to monitor progress.

After the project is completed, we can proceed in this way to involve the community. 😊

When these tasks are ready for the community to participate, we'd better list the dependencies of each sub-task.

yezhizi avatar Jul 18 '25 09:07 yezhizi

Maybe we can support TS.INFO earlier so that we can use it in debug and golang test cases. cc @yezhizi

PragmaTwice avatar Aug 20 '25 06:08 PragmaTwice

Hi @yezhizi, glad to see so much progress for this project : )

Would you like also add some documentation of the design of data structure on the website?

Refer to https://kvrocks.apache.org/community/data-structure-on-rocksdb.

PragmaTwice avatar Aug 31 '25 13:08 PragmaTwice

Sure!

yezhizi avatar Aug 31 '25 14:08 yezhizi

https://github.com/apache/kvrocks/pull/3164#issuecomment-3270135382 Maybe we can consider this as a task in this tracking issues.

PragmaTwice avatar Sep 09 '25 10:09 PragmaTwice

Maybe we can also support TS.DELETERULE so that users can unlink the two time series bound by TS.CREATERULE, if your bandwidth is enough. Otherwise we can make it a task for new comers.

PragmaTwice avatar Sep 13 '25 14:09 PragmaTwice

@PragmaTwice Thanks, that's a great point. To be honest, I don't have much bandwidth at the moment, so letting newcomers take this on sounds great.  I'll also be submitting some documentation to the website soon.

yezhizi avatar Sep 13 '25 15:09 yezhizi