aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/compactcas.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-11-22 10:58:20 +0100
committerGitHub Enterprise <[email protected]>2024-11-22 10:58:20 +0100
commit36658631e3f29b27d08b36fa6cf143d6902b7789 (patch)
tree8c618ec8081a40a479dc98dfd91b96b8b1e21e9c /src/zenstore/compactcas.cpp
parentfixed off-by-one in GetPidStatus (Linux) which might cause spurious errors (#... (diff)
downloadzen-36658631e3f29b27d08b36fa6cf143d6902b7789.tar.xz
zen-36658631e3f29b27d08b36fa6cf143d6902b7789.zip
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
Diffstat (limited to 'src/zenstore/compactcas.cpp')
-rw-r--r--src/zenstore/compactcas.cpp2
1 files changed, 1 insertions, 1 deletions
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<IoBuffer> Chunks, std::span<IoHash>
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);
}
}