Vladimir Davydov
authored
The compact_heap, used by the scheduler to schedule range compaction, contains all ranges except those that are currently being compacted. Since the appropriate vy_index object is required to schedule a range compaction, we have to store a pointer to the index a range belongs to in vy_range->index. This makes it impossible to move vy_range struct and its implementation to a separate source file. To address this, let's rework the scheduler as follows: - Make compact_heap store indexes, not ranges. An index is prioritized by the greatest compact_priority among its ranges. - Add a heap of ranges to each index, prioritized by compact_priority. A range is removed from the heap while it's being compacted. - Do not remove indexes from dump_heap or compact_heap when a task is scheduled (otherwise we could only schedule one compaction per index). Instead just update the index position in the heaps. Needed for #1906
Name | Last commit | Last update |
---|