reth
reth copied to clipboard
fix(storage): add `FileDataReader` & `MmapDataReader` to `NippyJar`
trafficstars
- Adds
FileDataReaderwhich as the name suggests, does not use mmap - Adds
DefaultDataReader: windows will beFileDataReader, othersMmapDataReader
Windows mmap behaviour differs from unix, and there have been issues in the past. Some I was able to repro (eg. trying to remove a file with a mmap handle open gives out an error), others not so much (eg. writing to a file while a mmap is open https://github.com/paradigmxyz/reth/issues/10689). I've also had unexpected behaviour where written data was not flushed/sync_all just because the mmap handle was open, but it wouldnt even panic.
So for now I think the safest is to disable mmap usage from windows.