aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-08-07 13:46:34 +0200
committerGitHub Enterprise <[email protected]>2024-08-07 13:46:34 +0200
commit159f1cb99647f936ed6946586b7541ea0c65efec (patch)
treef18302ea2c8d900dae6b98d6528412d2e6dfd03b /src/zenstore/include
parentstop exceptions from leaking on threaded work (#102) (diff)
downloadzen-159f1cb99647f936ed6946586b7541ea0c65efec.tar.xz
zen-159f1cb99647f936ed6946586b7541ea0c65efec.zip
add gc single threaded option (#104)
* add option to force gcv2 to run single threaded
Diffstat (limited to 'src/zenstore/include')
-rw-r--r--src/zenstore/include/zenstore/gc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/zenstore/include/zenstore/gc.h b/src/zenstore/include/zenstore/gc.h
index c3a71baa6..2edb5e0a5 100644
--- a/src/zenstore/include/zenstore/gc.h
+++ b/src/zenstore/include/zenstore/gc.h
@@ -444,6 +444,7 @@ struct GcSchedulerConfig
GcVersion UseGCVersion = GcVersion::kV1;
uint32_t CompactBlockUsageThresholdPercent = 90;
bool Verbose = false;
+ bool SingleThreaded = false;
};
struct GcSchedulerState
@@ -517,6 +518,7 @@ public:
std::optional<GcVersion> ForceGCVersion;
std::optional<uint32_t> CompactBlockUsageThresholdPercent;
std::optional<bool> Verbose;
+ std::optional<bool> SingleThreaded;
};
bool TriggerGc(const TriggerGcParams& Params);
@@ -542,7 +544,8 @@ private:
bool SkipCid,
GcVersion UseGCVersion,
uint32_t CompactBlockUsageThresholdPercent,
- bool Verbose);
+ bool Verbose,
+ bool SingleThreaded);
void ScrubStorage(bool DoDelete, bool SkipCid, std::chrono::seconds TimeSlice);
LoggerRef Log() { return m_Log; }
virtual bool AreDiskWritesAllowed() const override { return !m_AreDiskWritesBlocked.load(); }