aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/gc.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-08-22 16:03:01 +0200
committerGitHub Enterprise <[email protected]>2024-08-22 16:03:01 +0200
commit203d3f03f0d0ef51f414b5344462bde0a8fcaf1b (patch)
tree2d0cbe07dbf6b2d81a91e15c823ea0209205b39c /src/zenstore/gc.cpp
parentsafer calls to IsProcessRunning (#131) (diff)
downloadzen-203d3f03f0d0ef51f414b5344462bde0a8fcaf1b.tar.xz
zen-203d3f03f0d0ef51f414b5344462bde0a8fcaf1b.zip
separate worker pools into burst/background to avoid background jobs blocking client requests (#134)
Diffstat (limited to 'src/zenstore/gc.cpp')
-rw-r--r--src/zenstore/gc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp
index 3f3adeb82..d6bf99c3e 100644
--- a/src/zenstore/gc.cpp
+++ b/src/zenstore/gc.cpp
@@ -632,7 +632,7 @@ GcManager::CollectGarbage(const GcSettings& Settings)
std::unordered_map<std::unique_ptr<GcStoreCompactor>, GcCompactStoreStats*> StoreCompactors;
RwLock StoreCompactorsLock;
- WorkerThreadPool& ThreadPool = Settings.SingleThread ? GetSyncWorkerPool() : GetMediumWorkerPool();
+ WorkerThreadPool& ThreadPool = Settings.SingleThread ? GetSyncWorkerPool() : GetMediumWorkerPool(EWorkloadType::Background);
ZEN_INFO("GCV2: Removing expired data from {} referencers", m_GcReferencers.size());
if (!m_GcReferencers.empty())
@@ -2097,7 +2097,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 = GetMediumWorkerPool();
+ WorkerThreadPool& ThreadPool = GetMediumWorkerPool(EWorkloadType::Background);
ScrubContext Ctx{ThreadPool, Deadline};
try