aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-03-28 14:56:20 +0100
committerGitHub Enterprise <[email protected]>2024-03-28 14:56:20 +0100
commit76ac4d541c603dd869e18cfbc6644ebf6c6e22d7 (patch)
treef919560d5ddb5a33057f9337d930ca327149dafd /src/zenstore
parentadd "fieldnames" query param for GetProjectFiles/GetProjectChunkInfos (#29) (diff)
downloadzen-76ac4d541c603dd869e18cfbc6644ebf6c6e22d7.tar.xz
zen-76ac4d541c603dd869e18cfbc6644ebf6c6e22d7.zip
Use multithreading to fetch size/rawsize of entries in `/prj/{project}/oplog/{log}/chunkinfos` and `/prj/{project}/oplog/{log}/files` (#30)
- Improvement: Use multithreading to fetch size/rawsize of entries in `/prj/{project}/oplog/{log}/chunkinfos` and `/prj/{project}/oplog/{log}/files` - Improvement: Add `GetMediumWorkerPool()` in addition to `LargeWorkerPool()` and `SmallWorkerPool()`
Diffstat (limited to 'src/zenstore')
-rw-r--r--src/zenstore/cache/cachedisklayer.cpp2
-rw-r--r--src/zenstore/cas.cpp2
-rw-r--r--src/zenstore/gc.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/zenstore/cache/cachedisklayer.cpp b/src/zenstore/cache/cachedisklayer.cpp
index 93c841e46..d897e26ce 100644
--- a/src/zenstore/cache/cachedisklayer.cpp
+++ b/src/zenstore/cache/cachedisklayer.cpp
@@ -3620,7 +3620,7 @@ ZenCacheDiskLayer::Flush()
}
}
{
- WorkerThreadPool& Pool = GetSmallWorkerPool();
+ WorkerThreadPool& Pool = GetMediumWorkerPool();
Latch WorkLatch(1);
try
{
diff --git a/src/zenstore/cas.cpp b/src/zenstore/cas.cpp
index 4f137744b..a1a4a0acc 100644
--- a/src/zenstore/cas.cpp
+++ b/src/zenstore/cas.cpp
@@ -107,7 +107,7 @@ CasImpl::Initialize(const CidStoreConfiguration& InConfig)
// Initialize payload storage
{
- WorkerThreadPool& WorkerPool = GetSmallWorkerPool();
+ WorkerThreadPool& WorkerPool = GetMediumWorkerPool();
std::vector<std::future<void>> Work;
Work.emplace_back(
WorkerPool.EnqueueTask(std::packaged_task<void()>{[&]() { m_LargeStrategy.Initialize(m_Config.RootDirectory, IsNewStore); }}));
diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp
index f6469c51d..1a34019fb 100644
--- a/src/zenstore/gc.cpp
+++ b/src/zenstore/gc.cpp
@@ -618,7 +618,7 @@ GcManager::CollectGarbage(const GcSettings& Settings)
std::unordered_map<std::unique_ptr<GcStoreCompactor>, GcCompactStoreStats*> StoreCompactors;
RwLock StoreCompactorsLock;
- WorkerThreadPool& ThreadPool = Settings.SingleThread ? GetSyncWorkerPool() : GetSmallWorkerPool();
+ WorkerThreadPool& ThreadPool = Settings.SingleThread ? GetSyncWorkerPool() : GetMediumWorkerPool();
ZEN_INFO("GCV2: Removing expired data from {} referencers", m_GcReferencers.size());
if (!m_GcReferencers.empty())
@@ -2019,7 +2019,7 @@ GcScheduler::ScrubStorage(bool DoDelete, bool SkipCid, std::chrono::seconds Time
Stopwatch Timer;
ZEN_INFO("scrubbing STARTING (delete mode => {}, skip CID => {})", DoDelete, SkipCid);
- WorkerThreadPool& ThreadPool = GetSmallWorkerPool();
+ WorkerThreadPool& ThreadPool = GetMediumWorkerPool();
ScrubContext Ctx{ThreadPool, Deadline};
try