SwayDB
SwayDB copied to clipboard
Multiple file disk distribution should account for file sizes instead of file count
Context
Data can be distributed to multiple disks by specifying distribution ratio for each disk.
Issue
Currently the ratio is based on file count and not file size. In previous versions of SwayDB file-sizes were always consistent but due to the added concurrency to Segment compaction the file sizes can be inconsistent which are now specified by setting the minSegmentSize with maximum being minSegmentSize * 2 instead of the previous deprecated setting segmentSize.
Solution
Distribution ratio should be applied to total disk size and not the file count on each disk.