rocksdb icon indicating copy to clipboard operation
rocksdb copied to clipboard

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

Open rockeet opened this issue 1 year ago • 0 comments

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 avatar Aug 09 '24 12:08 rockeet