aboutsummaryrefslogtreecommitdiff
path: root/zenstore/cidstore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenstore/cidstore.cpp')
-rw-r--r--zenstore/cidstore.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/zenstore/cidstore.cpp b/zenstore/cidstore.cpp
index 9c8d4742c..08a3192ff 100644
--- a/zenstore/cidstore.cpp
+++ b/zenstore/cidstore.cpp
@@ -139,7 +139,7 @@ struct CidStore::Impl
for (auto& Kv : m_CidMap)
{
- ChunkSet.AddChunk(Kv.second);
+ ChunkSet.AddChunkToSet(Kv.second);
}
}
@@ -152,21 +152,21 @@ struct CidStore::Impl
}
ZEN_ERROR("Scrubbing found that {} cid mappings (out of {}) mapped to non-existent CAS chunks. These mappings will be removed",
- ChunkSet.GetChunkSet().size(),
+ ChunkSet.GetSize(),
m_CidMap.size());
// Erase all mappings to chunks which are not present in the underlying CAS store
// we do this by removing mappings from the in-memory lookup structure and also
// by emitting tombstone records to the commit log
- const auto& MissingChunks = ChunkSet.GetChunkSet();
std::vector<IoHash> BadChunks;
+
{
RwLock::SharedLockScope _(m_Lock);
for (auto It = begin(m_CidMap), ItEnd = end(m_CidMap); It != ItEnd;)
{
- if (auto MissingIt = MissingChunks.find(It->second); MissingIt != MissingChunks.end())
+ if (ChunkSet.ContainsChunk(It->second))
{
const IoHash& BadHash = It->first;