SwayDB icon indicating copy to clipboard operation
SwayDB copied to clipboard

LevelZero WAL files recovery should optionally allow lazy file reads

Open simerplaha opened this issue 4 years ago • 0 comments

Current solution

On reboot data in all WAL/Map (.log) files is recovered by reading the files in one seek and then applying parsing.

Issue

Since these files can be large, reading these files in one seek and parsing would be faster but it would require more memory.

Solution

Lazy recovery should be configured which will read smaller bytes chunks from the file and apply parsing and recovery.

Benchmark

I'm seeing over 30% memory (heap) reduction with lazy recovery.

simerplaha avatar Feb 02 '21 06:02 simerplaha