-
Type:
New Feature
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Filesystem API, Live Restore
-
Storage Engines
-
5
-
StorEng - 2024-12-10
A debug function in the Union FS code: {}union_fs_fill_holes_on_file_close {}reads holes from a file and moves them to the {}destination. Right now this only happens on close but eventually the background worker thread will use very similar logic.
In it's current implementation we only read from the source file in a single read of <= 4MB. This will break if a hole is greater than 4MB.
In this ticket we want to define a static in the file, DEBUG_READ_SIZE which will be set to some multiple of allocation_size which by default in WiredTiger is 4KB. If a hole is then larger than this DEBUG_READ_SIZE, N reads will be used to read that data from source and for every read a write to destination. A good read length may still be 4MB, but the logic to break a read into chunks doesn't exist.