reth icon indicating copy to clipboard operation
reth copied to clipboard

fix(storage): add `FileDataReader` & `MmapDataReader` to `NippyJar`

Open joshieDo opened this issue 1 year ago • 2 comments
trafficstars

  • Adds FileDataReader which as the name suggests, does not use mmap
  • Adds DefaultDataReader: windows will be FileDataReader, others MmapDataReader

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.

joshieDo avatar Sep 09 '24 18:09 joshieDo