From c7e22a4ef1cce7103b9afbeec487461cb32f8dbe Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Fri, 17 Jun 2022 07:06:21 -0700 Subject: Make cas storage an hidden implementation detail of CidStore (#130) - Bumped ZEN_SCHEMA_VERSION - CasStore no longer a public API, it is hidden behind CidStore - Moved cas.h from public header folder - CidStore no longer maps from Cid -> Cas, we store entries in Cas under RawHash - CasStore now decompresses data to validate content (matching against RawHash) - CasChunkSet renames to HashKeySet and put in separate header/cpp file - Disabled "Chunk" command for now as it relied on CAS being exposed as a service - Changed CAS http service to Cid http server - Moved "Run" command completely inside ZEN_WITH_EXEC_SERVICES define - Removed "cas.basic" test - Uncommented ".exec.basic" test and added return-skip at start of test - Moved ScrubContext to separate header file - Renamed CasGC to GcManager - Cleaned up configuration passing in cas store classes - Removed CAS stuff from GcContext and clarified naming in class - Remove migration code --- zenserver/projectstore.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'zenserver/projectstore.cpp') diff --git a/zenserver/projectstore.cpp b/zenserver/projectstore.cpp index 1853941ed..e42704ccf 100644 --- a/zenserver/projectstore.cpp +++ b/zenserver/projectstore.cpp @@ -16,8 +16,8 @@ #include #include #include -#include #include +#include #include "config.h" @@ -350,7 +350,7 @@ ProjectStore::Oplog::GatherReferences(GcContext& GcCtx) Hashes.push_back(Kv.second); } - GcCtx.ContributeCids(Hashes); + GcCtx.AddRetainedCids(Hashes); Hashes.clear(); @@ -359,7 +359,7 @@ ProjectStore::Oplog::GatherReferences(GcContext& GcCtx) Hashes.push_back(Kv.second); } - GcCtx.ContributeCids(Hashes); + GcCtx.AddRetainedCids(Hashes); } bool @@ -872,7 +872,7 @@ ProjectStore::Project::GatherReferences(GcContext& GcCtx) ////////////////////////////////////////////////////////////////////////// -ProjectStore::ProjectStore(CidStore& Store, std::filesystem::path BasePath, CasGc& Gc) +ProjectStore::ProjectStore(CidStore& Store, std::filesystem::path BasePath, GcManager& Gc) : GcContributor(Gc) , m_Log(zen::logging::Get("project")) , m_CidStore(Store) @@ -1482,7 +1482,7 @@ HttpProjectService::HttpProjectService(CidStore& Store, ProjectStore* Projects) { const IoHash FileHash = Entry.AsHash(); - if (!m_CidStore.FindChunkByCid(FileHash)) + if (!m_CidStore.ContainsChunk(FileHash)) { ZEN_DEBUG("prep - NEED: {}", FileHash); -- cgit v1.2.3