Skip to content
New issue

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

PosixMmapReadableFile::Read and PosixRandomAccessFile::Read has different behavior #12925

Open
rockeet opened this issue Aug 9, 2024 · 0 comments

Comments

@rockeet
Copy link
Contributor

rockeet commented Aug 9, 2024

Expected behavior

The behavior of PosixMmapReadableFile::Read and PosixRandomAccessFile::Read should be same.

Actual behavior

When the param offset is beyound file size, PosixMmapReadableFile::Read returns IOError but PosixRandomAccessFile::Read returns OK.

Steps to reproduce the behavior

Create a PosixMmapReadableFile and a PosixRandomAccessFile, write same content, then read beyound file size.

The fix should be simple, the key is which behavior is expected. This issue was found in our branch while we add PosixMmapReadableFile to env_basic_test.cc.

rockeet added a commit to topling/toplingdb that referenced this issue Aug 9, 2024
The behavior of PosixMmapReadableFile::Read and PosixRandomAccessFile::Read should be same.

see facebook/rocksdb#12925
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant