aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/compactcas.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-02-28 11:10:34 +0100
committerGitHub <[email protected]>2024-02-28 11:10:34 +0100
commitbd3b270b57eafc626ca42efea3be8c460761c6ca (patch)
treebea450cfeb1c0f092d143e2f3283c65fe432617d /src/zenstore/compactcas.cpp
parentadd disk caching to block move (#661) (diff)
downloadzen-bd3b270b57eafc626ca42efea3be8c460761c6ca.tar.xz
zen-bd3b270b57eafc626ca42efea3be8c460761c6ca.zip
Make sure we wait for all scheduled tasks to complete before throwing exceptions further (#662)
Bugfix: We must not throw exceptions to calling function until all async work we spawned has returned
Diffstat (limited to 'src/zenstore/compactcas.cpp')
-rw-r--r--src/zenstore/compactcas.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/zenstore/compactcas.cpp b/src/zenstore/compactcas.cpp
index b308ddd4f..c8fb41ffc 100644
--- a/src/zenstore/compactcas.cpp
+++ b/src/zenstore/compactcas.cpp
@@ -699,7 +699,11 @@ public:
{
}
- virtual GcStoreCompactor* RemoveUnreferencedData(GcCtx& Ctx, GcStats& Stats, const GetUnusedReferencesFunc& GetUnusedReferences)
+ virtual std::string GetGcName(GcCtx& Ctx) override { return m_CasContainerStrategy.GetGcName(Ctx); }
+
+ virtual GcStoreCompactor* RemoveUnreferencedData(GcCtx& Ctx,
+ GcStats& Stats,
+ const GetUnusedReferencesFunc& GetUnusedReferences) override
{
ZEN_TRACE_CPU("CasContainer::RemoveUnreferencedData");
@@ -778,7 +782,7 @@ private:
std::string
CasContainerStrategy::GetGcName(GcCtx&)
{
- return fmt::format("compactcas:'{}'", (m_RootDirectory / m_ContainerBaseName).string());
+ return fmt::format("compactcas: '{}'", (m_RootDirectory / m_ContainerBaseName).string());
}
GcReferencePruner*