From 36658631e3f29b27d08b36fa6cf143d6902b7789 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Fri, 22 Nov 2024 10:58:20 +0100 Subject: fix inconsistencies in filecas due to failing to remove payload file during GC (#224) make sure we rewrite filecas entries if chunk size changes (due to compression changes) hardening of move/write files in filecas if we encounter a filecas entry with mismatching size (due to pre-existing bug) we validate the file and update the index if we find a bad filecas file on disk we now attempt to remove it --- src/zenstore/compactcas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/zenstore/compactcas.cpp') diff --git a/src/zenstore/compactcas.cpp b/src/zenstore/compactcas.cpp index 7f1300177..b3309f7a7 100644 --- a/src/zenstore/compactcas.cpp +++ b/src/zenstore/compactcas.cpp @@ -257,7 +257,7 @@ CasContainerStrategy::InsertChunks(std::span Chunks, std::span RwLock::ExclusiveLockScope _(m_LocationMapLock); for (const CasDiskIndexEntry& DiskIndexEntry : IndexEntries) { - m_LocationMap.emplace(DiskIndexEntry.Key, m_Locations.size()); + m_LocationMap.insert_or_assign(DiskIndexEntry.Key, m_Locations.size()); m_Locations.push_back(DiskIndexEntry.Location); } } -- cgit v1.2.3