GitHub user mapleFU edited a comment on the discussion: TimeSeries Proposal

> inserting algorithm (insert ts1, v1):

Finally I have time for this. I think the key design looks good to me. The 
problem is focus on the insert. Basically my idea is:

Terminology:
1. Sealed Chunk: A chunk, which could be compressed, and likely to be queryed 
and not inserted frequently. It can still be updated, but we don't regard 
update into it a good behavior
2. Unsealed Chunk: A chunk that is likely to be inserted, it should be 
"uncompressed"

The chunks layouts like:
```
[ sealed ] [ sealed ] [ sealed ] [unsealed ...)
```

When insert:
1. if it's inserting to unsealed chunk, just append into it. If unsealed chunk 
size reaches `chunk-size`, switch a new chunk, and seals this chunk ( or maybe 
seal it later )
2. If it's a sealed chunk, we need overwrite the whole chunk, and rewrite it. 
We can supports split, but this is not neccessary here.

Note that this don't follows `50%` ratio. Because it's likely to append to the 
"newest" unsealed chunk.

GitHub link: 
https://github.com/apache/kvrocks/discussions/3044#discussioncomment-13731078

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to