diff options
Diffstat (limited to 'zenstore/gc.cpp')
| -rw-r--r-- | zenstore/gc.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/zenstore/gc.cpp b/zenstore/gc.cpp index 5c2ee2daa..1b987ca08 100644 --- a/zenstore/gc.cpp +++ b/zenstore/gc.cpp @@ -16,7 +16,8 @@ struct GcContext::GcState { CasChunkSet m_CasChunks; CasChunkSet m_CidChunks; - bool m_DeletionMode = true; + bool m_DeletionMode = true; + bool m_ContainerGcEnabled = false; }; GcContext::GcContext() : m_State(std::make_unique<GcState>()) @@ -62,12 +63,25 @@ GcContext::IsDeletionMode() const { return m_State->m_DeletionMode; } + void GcContext::SetDeletionMode(bool NewState) { m_State->m_DeletionMode = NewState; } +bool +GcContext::IsContainerGcEnabled() const +{ + return m_State->m_ContainerGcEnabled; +} + +void +GcContext::SetContainerGcEnabled(bool NewState) +{ + m_State->m_ContainerGcEnabled = NewState; +} + ////////////////////////////////////////////////////////////////////////// GcContributor::GcContributor(CasGc& Gc) : m_Gc(Gc) @@ -139,6 +153,7 @@ CasGc::CollectGarbage() GcContext GcCtx; GcCtx.SetDeletionMode(true); + GcCtx.SetContainerGcEnabled(false); for (GcContributor* Contributor : m_GcContribs) { |