mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-02 13:06:57 +00:00
The current method of segregating partitions doesn't work well for huge number of small partitions. For especially bad input, it can produce hundreds or even thousands of buckets. This patch adds a new segregator specialized for this use-case. This segregator uses a memtable to sort out-of-order partitions in-memory. When the memtable size reaches the provided max-memory limit, it is flushed to disk and a new empty one is created. In-order partitions bypass the sorting altogether and go to the fast-path bucket. The new method is not used yet, this will come in the next patch.