diff options
| author | Stefan Boberg <[email protected]> | 2023-05-15 20:54:46 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2023-05-15 20:54:46 +0200 |
| commit | 583b308a1e605da9bd70484767d6134891b9c3ba (patch) | |
| tree | 5769264a7f637823c39e62cd61a2b44316102d5a /src/zenserver/projectstore | |
| parent | some HttpClient changes eliminating some cpr helpers (diff) | |
| download | zen-583b308a1e605da9bd70484767d6134891b9c3ba.tar.xz zen-583b308a1e605da9bd70484767d6134891b9c3ba.zip | |
minor GC API cleanup
Scrub -> ScrubStorage
Trigger -> TriggerGc (to make relationship to TriggerScrub clearer)
Diffstat (limited to 'src/zenserver/projectstore')
| -rw-r--r-- | src/zenserver/projectstore/projectstore.cpp | 10 | ||||
| -rw-r--r-- | src/zenserver/projectstore/projectstore.h | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp index 7fd9bcae0..381f163aa 100644 --- a/src/zenserver/projectstore/projectstore.cpp +++ b/src/zenserver/projectstore/projectstore.cpp @@ -642,7 +642,7 @@ ProjectStore::Oplog::Flush() } void -ProjectStore::Oplog::Scrub(ScrubContext& Ctx) const +ProjectStore::Oplog::ScrubStorage(ScrubContext& Ctx) const { ZEN_UNUSED(Ctx); } @@ -1535,7 +1535,7 @@ ProjectStore::Project::Flush() } void -ProjectStore::Project::Scrub(ScrubContext& Ctx) +ProjectStore::Project::ScrubStorage(ScrubContext& Ctx) { // Scrubbing needs to check all existing oplogs std::vector<std::string> OpLogs = ScanForOplogs(); @@ -1546,7 +1546,7 @@ ProjectStore::Project::Scrub(ScrubContext& Ctx) IterateOplogs([&](const Oplog& Ops) { if (!IsExpired(GcClock::TimePoint::max(), Ops)) { - Ops.Scrub(Ctx); + Ops.ScrubStorage(Ctx); } }); } @@ -1753,7 +1753,7 @@ ProjectStore::Flush() } void -ProjectStore::Scrub(ScrubContext& Ctx) +ProjectStore::ScrubStorage(ScrubContext& Ctx) { DiscoverProjects(); @@ -1773,7 +1773,7 @@ ProjectStore::Scrub(ScrubContext& Ctx) } for (const Ref<Project>& Project : Projects) { - Project->Scrub(Ctx); + Project->ScrubStorage(Ctx); } } diff --git a/src/zenserver/projectstore/projectstore.h b/src/zenserver/projectstore/projectstore.h index b446de543..37093c0fb 100644 --- a/src/zenserver/projectstore/projectstore.h +++ b/src/zenserver/projectstore/projectstore.h @@ -111,7 +111,7 @@ public: spdlog::logger& Log() { return m_OuterProject->Log(); } void Flush(); - void Scrub(ScrubContext& Ctx) const; + void ScrubStorage(ScrubContext& Ctx) const; void GatherReferences(GcContext& GcCtx); static uint64_t TotalSize(const std::filesystem::path& BasePath); uint64_t TotalSize() const; @@ -220,7 +220,7 @@ public: void Write(); [[nodiscard]] static bool Exists(const std::filesystem::path& BasePath); void Flush(); - void Scrub(ScrubContext& Ctx); + void ScrubStorage(ScrubContext& Ctx); spdlog::logger& Log(); void GatherReferences(GcContext& GcCtx); uint64_t TotalSize() const; @@ -253,7 +253,7 @@ public: bool DeleteProject(std::string_view ProjectId); bool Exists(std::string_view ProjectId); void Flush(); - void Scrub(ScrubContext& Ctx); + void ScrubStorage(ScrubContext& Ctx); void DiscoverProjects(); void IterateProjects(std::function<void(Project& Prj)>&& Fn); |