simerplaha / SwayDB

Persistent and in-memory key-value storage engine for JVM that scales on a single machine.
https://swaydb.simer.au
Apache License 2.0
293 stars 16 forks source link

Refreshing Segments should run only on expired Segment blocks #332

Open simerplaha opened 3 years ago

simerplaha commented 3 years ago

To clear expired key-values compaction invokes refresh on the Segment. Refresh only needs to occurs on Segment blocks which contain expired key-values all other blocks can be transferred directly to the new Segment without reading it into the heap.