This commit is contained in:
Yukun J 2025-04-08 20:37:58 -04:00 committed by GitHub
commit e56adf07ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -176,7 +176,7 @@ class PosixSequentialFile final : public SequentialFile {
class PosixRandomAccessFile final : public RandomAccessFile {
public:
// The new instance takes ownership of |fd|. |fd_limiter| must outlive this
// instance, and will be used to determine if .
// instance, and will be used to determine if the file will be opened on every read.
PosixRandomAccessFile(std::string filename, int fd, Limiter* fd_limiter)
: has_permanent_fd_(fd_limiter->Acquire()),
fd_(has_permanent_fd_ ? fd : -1),