diff options
| author | Dan Engelbrecht <[email protected]> | 2024-09-03 19:40:54 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-09-03 19:40:54 +0200 |
| commit | 3dfd38c8837c513cb3a5eff576cf3590046bd31e (patch) | |
| tree | a3ab8d88738dcbeae5d709ccacfe15e1ed58b9ee /src/zenstore | |
| parent | meta info store (#75) (diff) | |
| download | zen-3dfd38c8837c513cb3a5eff576cf3590046bd31e.tar.xz zen-3dfd38c8837c513cb3a5eff576cf3590046bd31e.zip | |
oplog index snapshots (#140)
- Feature: Added project store oplog index snapshots for faster opening of oplog - opening oplogs are roughly 10x faster
Diffstat (limited to 'src/zenstore')
| -rw-r--r-- | src/zenstore/blockstore.cpp | 2 | ||||
| -rw-r--r-- | src/zenstore/cache/structuredcachestore.cpp | 2 | ||||
| -rw-r--r-- | src/zenstore/caslog.cpp | 4 | ||||
| -rw-r--r-- | src/zenstore/include/zenstore/caslog.h | 4 |
4 files changed, 8 insertions, 4 deletions
diff --git a/src/zenstore/blockstore.cpp b/src/zenstore/blockstore.cpp index 287a3f7fa..e20888ae4 100644 --- a/src/zenstore/blockstore.cpp +++ b/src/zenstore/blockstore.cpp @@ -1143,6 +1143,8 @@ BlockStore::IterateBlock(std::span<const BlockStoreLocation> ChunkLocations, const IterateChunksLargeSizeCallback& LargeSizeCallback, uint64_t LargeSizeLimit) { + ZEN_TRACE_CPU("BlockStore::IterateBlock"); + if (InChunkIndexes.empty()) { return true; diff --git a/src/zenstore/cache/structuredcachestore.cpp b/src/zenstore/cache/structuredcachestore.cpp index 9981aa1eb..ac1db2a4e 100644 --- a/src/zenstore/cache/structuredcachestore.cpp +++ b/src/zenstore/cache/structuredcachestore.cpp @@ -1035,6 +1035,8 @@ ZenCacheStore::GetBucketInfo(std::string_view NamespaceName, std::string_view Bu std::vector<RwLock::SharedLockScope> ZenCacheStore::LockState(GcCtx&) { + ZEN_TRACE_CPU("CacheStore::LockState"); + std::vector<RwLock::SharedLockScope> Locks; Locks.emplace_back(RwLock::SharedLockScope(m_NamespacesLock)); for (auto& NamespaceIt : m_Namespaces) diff --git a/src/zenstore/caslog.cpp b/src/zenstore/caslog.cpp index 2c26e522f..139456349 100644 --- a/src/zenstore/caslog.cpp +++ b/src/zenstore/caslog.cpp @@ -153,13 +153,13 @@ CasLogFile::Close() } uint64_t -CasLogFile::GetLogSize() +CasLogFile::GetLogSize() const { return m_File.FileSize(); } uint64_t -CasLogFile::GetLogCount() +CasLogFile::GetLogCount() const { uint64_t LogFileSize = m_AppendOffset.load(std::memory_order_acquire); if (LogFileSize < sizeof(FileHeader)) diff --git a/src/zenstore/include/zenstore/caslog.h b/src/zenstore/include/zenstore/caslog.h index d8c3f22f3..edb4f8d9b 100644 --- a/src/zenstore/include/zenstore/caslog.h +++ b/src/zenstore/include/zenstore/caslog.h @@ -26,8 +26,8 @@ public: void Replay(std::function<void(const void*)>&& Handler, uint64_t SkipEntryCount); void Flush(); void Close(); - uint64_t GetLogSize(); - uint64_t GetLogCount(); + uint64_t GetLogSize() const; + uint64_t GetLogCount() const; private: struct FileHeader |