Skip to content

Commit

Permalink
Merge pull request #32753 from vespa-engine/toregge/deinline-docstore…
Browse files Browse the repository at this point in the history
…-randreaders-destructors

Deinline docstore randreaders destructors.
  • Loading branch information
geirst authored Nov 4, 2024
2 parents 3c6905d + 62892cc commit 0771e8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions searchlib/src/vespa/searchlib/docstore/randreaders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ DirectIORandRead::DirectIORandRead(const std::string & fileName)
}
}

DirectIORandRead::~DirectIORandRead() = default;

FileRandRead::FSP
DirectIORandRead::read(size_t offset, vespalib::DataBuffer & buffer, size_t sz)
{
Expand Down Expand Up @@ -64,6 +66,7 @@ MMapRandRead::MMapRandRead(const std::string & fileName, int mmapFlags, int fadv
}
}

MMapRandRead::~MMapRandRead() = default;

NormalRandRead::NormalRandRead(const std::string & fileName)
: _file(std::make_unique<FastOS_File>(fileName.c_str()))
Expand All @@ -73,6 +76,8 @@ NormalRandRead::NormalRandRead(const std::string & fileName)
}
}

NormalRandRead::~NormalRandRead() = default;

FileRandRead::FSP
MMapRandRead::read(size_t offset, vespalib::DataBuffer & buffer, size_t sz)
{
Expand Down Expand Up @@ -103,6 +108,8 @@ MMapRandReadDynamic::MMapRandReadDynamic(const std::string &fileName, int mmapFl
remap(0);
}

MMapRandReadDynamic::~MMapRandReadDynamic() = default;

void
MMapRandReadDynamic::remap(size_t sz)
{
Expand Down
4 changes: 4 additions & 0 deletions searchlib/src/vespa/searchlib/docstore/randreaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class DirectIORandRead : public FileRandRead
{
public:
DirectIORandRead(const std::string & fileName);
~DirectIORandRead() override;
FSP read(size_t offset, vespalib::DataBuffer & buffer, size_t sz) override;
int64_t getSize() const override;
private:
Expand All @@ -27,6 +28,7 @@ class MMapRandRead : public FileRandRead
{
public:
MMapRandRead(const std::string & fileName, int mmapFlags, int fadviseOptions);
~MMapRandRead() override;
FSP read(size_t offset, vespalib::DataBuffer & buffer, size_t sz) override;
int64_t getSize() const override;
const void * getMapping();
Expand All @@ -38,6 +40,7 @@ class MMapRandReadDynamic : public FileRandRead
{
public:
MMapRandReadDynamic(const std::string & fileName, int mmapFlags, int fadviseOptions);
~MMapRandReadDynamic() override;
FSP read(size_t offset, vespalib::DataBuffer & buffer, size_t sz) override;
int64_t getSize() const override;
private:
Expand All @@ -54,6 +57,7 @@ class NormalRandRead : public FileRandRead
{
public:
NormalRandRead(const std::string & fileName);
~NormalRandRead() override;
FSP read(size_t offset, vespalib::DataBuffer & buffer, size_t sz) override;
int64_t getSize() const override;
private:
Expand Down

0 comments on commit 0771e8e

Please sign in to comment.