Skip to content

Commit

Permalink
fix: Implement purely virtual FSWritableFile::GetFileSize
Browse files Browse the repository at this point in the history
API change with RocksDB v9.0.0 removes default implementation of
`FSWritableFile::GetFileSize`. We therefore need to implement
`ZonedWriteableFile::GetFileSize`.

Signed-off-by: Dennis Maisenbacher <[email protected]>
  • Loading branch information
MaisenbacherD committed Aug 26, 2024
1 parent 5de0863 commit 620aa55
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/io_zenfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ class ZonedWritableFile : public FSWritableFile {
virtual IOStatus Fsync(const IOOptions& options,
IODebugContext* dbg) override;

uint64_t GetFileSize(const IOOptions& options, IODebugContext* dbg) {
(void) options;
(void) dbg;
return zoneFile_->GetFileSize();
}
bool use_direct_io() const override { return !buffered; }
bool IsSyncThreadSafe() const override { return true; };
size_t GetRequiredBufferAlignment() const override {
Expand Down

0 comments on commit 620aa55

Please sign in to comment.