aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcachestore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver/cache/structuredcachestore.cpp')
-rw-r--r--zenserver/cache/structuredcachestore.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp
index 9ae01c5df..2746dc673 100644
--- a/zenserver/cache/structuredcachestore.cpp
+++ b/zenserver/cache/structuredcachestore.cpp
@@ -3213,7 +3213,6 @@ TEST_CASE("z$.threadedinsert") // * doctest::skip(true))
}
}
- RwLock ChunkHashesLock;
std::atomic_uint32_t AddedChunkCount;
for (const auto& Chunk : NewChunks)
@@ -3236,13 +3235,8 @@ TEST_CASE("z$.threadedinsert") // * doctest::skip(true))
}
while (AddedChunkCount.load() < NewChunks.size())
{
- std::unordered_map<IoHash, Chunk, IoHash::Hasher> AddedChunks;
- {
- RwLock::ExclusiveLockScope _(ChunkHashesLock);
- AddedChunks.swap(NewChunks);
- }
// Need to be careful since we might GC blocks we don't know outside of RwLock::ExclusiveLockScope
- for (const auto& Chunk : AddedChunks)
+ for (const auto& Chunk : NewChunks)
{
ZenCacheValue CacheValue;
if (Zcs.Get(Chunk.second.Bucket, Chunk.first, CacheValue))
@@ -3289,13 +3283,8 @@ TEST_CASE("z$.threadedinsert") // * doctest::skip(true))
}
{
- std::unordered_map<IoHash, Chunk, IoHash::Hasher> AddedChunks;
- {
- RwLock::ExclusiveLockScope _(ChunkHashesLock);
- AddedChunks.swap(NewChunks);
- }
// Need to be careful since we might GC blocks we don't know outside of RwLock::ExclusiveLockScope
- for (const auto& Chunk : AddedChunks)
+ for (const auto& Chunk : NewChunks)
{
ZenCacheValue CacheValue;
if (Zcs.Get(Chunk.second.Bucket, Chunk.first, CacheValue))