aboutsummaryrefslogtreecommitdiff
path: root/zenserver/projectstore.h
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2021-05-21 09:52:28 +0200
committerGitHub <[email protected]>2021-05-21 09:52:28 +0200
commitd795184a5c29727079903298a762c0059362d478 (patch)
tree9adb71ee9a42d771eb18fea6c85f515956840650 /zenserver/projectstore.h
parentFixed mis-merge (diff)
downloadzen-d795184a5c29727079903298a762c0059362d478.tar.xz
zen-d795184a5c29727079903298a762c0059362d478.zip
Added support for package additional files. Added io hash chunk id to… (#2)
Added support for attaching additional files to oplog entries in project store
Diffstat (limited to 'zenserver/projectstore.h')
-rw-r--r--zenserver/projectstore.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/zenserver/projectstore.h b/zenserver/projectstore.h
index 38c53ea6e..72b8a1cd6 100644
--- a/zenserver/projectstore.h
+++ b/zenserver/projectstore.h
@@ -99,6 +99,12 @@ public:
uint64_t Size;
};
+ struct FileMapEntry
+ {
+ std::string ServerPath;
+ std::string ClientPath;
+ };
+
template<class V>
using OidMap = tsl::robin_map<Oid, V, Oid::Hasher>;
@@ -108,18 +114,17 @@ public:
std::filesystem::path m_BasePath;
std::filesystem::path m_TempPath;
- OidMap<IoHash> m_ChunkMap; // output data chunk id -> CAS address
- OidMap<IoHash> m_MetaMap; // meta chunk id -> CAS address
- OidMap<std::string> m_FileMap; // file id -> client file
- OidMap<std::string> m_ServerFileMap; // file id -> server file
- std::map<int, OplogEntryAddress> m_OpAddressMap; // Index LSN -> op data in ops blob file
- OidMap<int> m_LatestOpMap; // op key -> latest op LSN for key
+ OidMap<IoHash> m_ChunkMap; // output data chunk id -> CAS address
+ OidMap<IoHash> m_MetaMap; // meta chunk id -> CAS address
+ OidMap<FileMapEntry> m_FileMap; // file id -> file map entry
+ int32_t m_ManifestVersion; // File system manifest version
+ std::map<int, OplogEntryAddress> m_OpAddressMap; // Index LSN -> op data in ops blob file
+ OidMap<int> m_LatestOpMap; // op key -> latest op LSN for key
RefPtr<OplogStorage> m_Storage;
std::string m_OplogId;
- void AddFileMapping(Oid FileId, std::string_view Path);
- void AddServerFileMapping(Oid FileId, std::string_view Path);
+ bool AddFileMapping(Oid FileId, IoHash Hash, std::string_view ServerPath, std::string_view ClientPath);
void AddChunkMapping(Oid ChunkId, IoHash Hash);
void AddMetaMapping(Oid ChunkId, IoHash Hash);
};