diff options
| author | Per Larsson <[email protected]> | 2021-12-10 15:29:18 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2021-12-10 15:29:18 +0100 |
| commit | 370d0134a7f755b1e39fbba5c9482ecc9ff3a0fe (patch) | |
| tree | 7329dc070434ccc265be6a7651274366d8c9fc06 /zenstore/compactcas.h | |
| parent | Set GC default enabled and interval set to zero (off). (diff) | |
| download | zen-370d0134a7f755b1e39fbba5c9482ecc9ff3a0fe.tar.xz zen-370d0134a7f755b1e39fbba5c9482ecc9ff3a0fe.zip | |
Added size to GcStorage.
Diffstat (limited to 'zenstore/compactcas.h')
| -rw-r--r-- | zenstore/compactcas.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zenstore/compactcas.h b/zenstore/compactcas.h index 1d3a2beff..f3a933718 100644 --- a/zenstore/compactcas.h +++ b/zenstore/compactcas.h @@ -80,7 +80,7 @@ static_assert(sizeof(CasDiskIndexEntry) == 32); * */ -struct CasContainerStrategy : public GcStorage +struct CasContainerStrategy final : public GcStorage { CasContainerStrategy(const CasStoreConfiguration& Config, CasGc& Gc); ~CasContainerStrategy(); @@ -93,8 +93,8 @@ struct CasContainerStrategy : public GcStorage void Initialize(const std::string_view ContainerBaseName, uint64_t Alignment, bool IsNewStore); void Flush(); void Scrub(ScrubContext& Ctx); - void CollectGarbage(GcContext& GcCtx); - uint64_t TotalSize() const { return m_TotalSize; } + virtual void CollectGarbage(GcContext& GcCtx) override; + virtual GcStorageSize StorageSize() const override { return {.DiskSize = m_TotalSize.load(std::memory_order::relaxed)}; } private: void OpenContainer(bool IsNewStore); |