We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If the db is on a file system without mmap support, like a remote share or some FUSE filesystem, mmap(2)/MapViewOfFile may fail. Now that we target Go 1.23+, there's an easy way to detect this with errors.Is(err, errors.ErrUnsupported) (added in Go 1.21). This seems to work quite well in my project: https://github.com/database64128/shadowsocks-go/blob/f299d1bb61ba85840dbfbf948adeb8d2b4c216c4/mmap/mmap.go#L39
mmap(2)
MapViewOfFile
errors.Is(err, errors.ErrUnsupported)
If you are OK with this idea, I can open a PR to implement it.
The text was updated successfully, but these errors were encountered:
Sure, I'd be happy to accept a PR to do that. Please mention it in the documentation for the function as well.
Sorry, something went wrong.
Add fallback path for mmap
78367a4
Closes oschwald#163.
d57a665
Successfully merging a pull request may close this issue.
If the db is on a file system without mmap support, like a remote share or some FUSE filesystem,
mmap(2)
/MapViewOfFile
may fail. Now that we target Go 1.23+, there's an easy way to detect this witherrors.Is(err, errors.ErrUnsupported)
(added in Go 1.21). This seems to work quite well in my project: https://github.com/database64128/shadowsocks-go/blob/f299d1bb61ba85840dbfbf948adeb8d2b4c216c4/mmap/mmap.go#L39If you are OK with this idea, I can open a PR to implement it.
The text was updated successfully, but these errors were encountered: