aboutsummaryrefslogtreecommitdiff
path: root/zenstore/CAS.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-21 13:02:29 +0200
committerStefan Boberg <[email protected]>2021-09-21 13:02:29 +0200
commit89331b4329c275d6292238c3024ff8441d8df381 (patch)
tree333902f3314db2e04d275f6566639e188efbe1d0 /zenstore/CAS.cpp
parentAdded human-friendly formatting of response send errors (diff)
downloadzen-89331b4329c275d6292238c3024ff8441d8df381.tar.xz
zen-89331b4329c275d6292238c3024ff8441d8df381.zip
Removed scrubbing from CasImpl::Initialize since this is triggered by higher level code now
Diffstat (limited to 'zenstore/CAS.cpp')
-rw-r--r--zenstore/CAS.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/zenstore/CAS.cpp b/zenstore/CAS.cpp
index 916e7f709..a3837d159 100644
--- a/zenstore/CAS.cpp
+++ b/zenstore/CAS.cpp
@@ -111,9 +111,6 @@ CasImpl::Initialize(const CasStoreConfiguration& InConfig)
m_TinyStrategy.Initialize("tobs", 16, IsNewStore);
m_SmallStrategy.Initialize("sobs", 4096, IsNewStore);
-
- ScrubContext Ctx;
- Scrub(Ctx);
}
CasStore::InsertResult
@@ -176,6 +173,13 @@ CasImpl::Flush()
void
CasImpl::Scrub(ScrubContext& Ctx)
{
+ if (m_LastScrubTime == Ctx.ScrubTimestamp())
+ {
+ return;
+ }
+
+ m_LastScrubTime = Ctx.ScrubTimestamp();
+
m_SmallStrategy.Scrub(Ctx);
m_TinyStrategy.Scrub(Ctx);
m_LargeStrategy.Scrub(Ctx);