Suggestion
Convert RelocationWatermark into a trait with default functions:
relocation_file_path
load
save
Create WalRelocationWatermark and IndexRelocationWatermark that implement this trait.
The current RelocatorDriver would take as input a generic Relocator that implements default functions that are common to all relocation strategies.
Create a separate WalRelocator and IndexRelocator implementing Relocator. These structures are respectively initialised with WalRelocationWatermark and IndexRelocationWatermark and only contain the logic of their respective relocation strategy.
Suggestion
Convert
RelocationWatermarkinto a trait with default functions:relocation_file_pathloadsaveCreate
WalRelocationWatermarkandIndexRelocationWatermarkthat implement this trait.The current
RelocatorDriverwould take as input a genericRelocatorthat implements default functions that are common to all relocation strategies.Create a separate
WalRelocatorandIndexRelocatorimplementingRelocator. These structures are respectively initialised withWalRelocationWatermarkandIndexRelocationWatermarkand only contain the logic of their respective relocation strategy.