aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/cache/structuredcachestore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenstore/cache/structuredcachestore.cpp')
-rw-r--r--src/zenstore/cache/structuredcachestore.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/zenstore/cache/structuredcachestore.cpp b/src/zenstore/cache/structuredcachestore.cpp
index 52b494e45..cff0e9a35 100644
--- a/src/zenstore/cache/structuredcachestore.cpp
+++ b/src/zenstore/cache/structuredcachestore.cpp
@@ -608,7 +608,10 @@ ZenCacheStore::GetBatch::Commit()
m_CacheStore.m_HitCount++;
OpScope.SetBytes(Result.Value.GetSize());
}
- m_CacheStore.m_MissCount++;
+ else
+ {
+ m_CacheStore.m_MissCount++;
+ }
}
}
}
@@ -683,8 +686,8 @@ ZenCacheStore::Get(const CacheRequestContext& Context,
return false;
}
ZEN_WARN("request for unknown namespace '{}' in ZenCacheStore::Get [{}], bucket '{}', key '{}'",
- Context,
Namespace,
+ Context,
Bucket,
HashKey.ToHexString());
@@ -719,8 +722,8 @@ ZenCacheStore::Get(const CacheRequestContext& Context,
}
ZEN_WARN("request for unknown namespace '{}' in ZenCacheStore::Get [{}], bucket '{}', key '{}'",
- Context,
Namespace,
+ Context,
Bucket,
HashKey.ToHexString());
@@ -787,8 +790,8 @@ ZenCacheStore::Put(const CacheRequestContext& Context,
}
ZEN_WARN("request for unknown namespace '{}' in ZenCacheStore::Put [{}] bucket '{}', key '{}'",
- Context,
Namespace,
+ Context,
Bucket,
HashKey.ToHexString());
@@ -813,7 +816,7 @@ ZenCacheStore::DropNamespace(std::string_view InNamespace)
{
std::function<void()> PostDropOp;
{
- RwLock::SharedLockScope _(m_NamespacesLock);
+ RwLock::ExclusiveLockScope _(m_NamespacesLock);
if (auto It = m_Namespaces.find(std::string(InNamespace)); It != m_Namespaces.end())
{
ZenCacheNamespace& Namespace = *It->second;
@@ -1392,6 +1395,8 @@ namespace testutils {
} // namespace testutils
+TEST_SUITE_BEGIN("store.structuredcachestore");
+
TEST_CASE("cachestore.store")
{
ScopedTemporaryDirectory TempDir;
@@ -1548,7 +1553,7 @@ TEST_CASE("cachestore.size")
}
}
-TEST_CASE("cachestore.threadedinsert") // * doctest::skip(true))
+TEST_CASE("cachestore.threadedinsert" * doctest::skip())
{
// for (uint32_t i = 0; i < 100; ++i)
{
@@ -2741,6 +2746,8 @@ TEST_CASE("cachestore.newgc.basics")
}
}
+TEST_SUITE_END();
+
#endif
void