diff options
| author | Dan Engelbrecht <[email protected]> | 2024-02-28 11:10:34 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-28 11:10:34 +0100 |
| commit | bd3b270b57eafc626ca42efea3be8c460761c6ca (patch) | |
| tree | bea450cfeb1c0f092d143e2f3283c65fe432617d /src/zenstore/filecas.cpp | |
| parent | add disk caching to block move (#661) (diff) | |
| download | zen-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/filecas.cpp')
| -rw-r--r-- | src/zenstore/filecas.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/zenstore/filecas.cpp b/src/zenstore/filecas.cpp index 7aa180b68..af0a3a176 100644 --- a/src/zenstore/filecas.cpp +++ b/src/zenstore/filecas.cpp @@ -1531,7 +1531,11 @@ class FileCasReferencePruner : public GcReferencePruner public: FileCasReferencePruner(FileCasStrategy& Owner, std::vector<IoHash>&& Cids) : m_FileCasStrategy(Owner), m_Cids(std::move(Cids)) {} - virtual GcStoreCompactor* RemoveUnreferencedData(GcCtx& Ctx, GcStats& Stats, const GetUnusedReferencesFunc& GetUnusedReferences) + virtual std::string GetGcName(GcCtx& Ctx) override { return m_FileCasStrategy.GetGcName(Ctx); } + + virtual GcStoreCompactor* RemoveUnreferencedData(GcCtx& Ctx, + GcStats& Stats, + const GetUnusedReferencesFunc& GetUnusedReferences) override { ZEN_TRACE_CPU("FileCas::RemoveUnreferencedData"); @@ -1606,7 +1610,7 @@ private: std::string FileCasStrategy::GetGcName(GcCtx&) { - return fmt::format("filecas:'{}'", m_RootDirectory.string()); + return fmt::format("filecas: '{}'", m_RootDirectory.string()); } GcReferencePruner* |