aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-11-08 15:25:56 +0100
committerGitHub <[email protected]>2023-11-08 15:25:56 +0100
commitb8460468bcdb9f331d06afb2b3b9967bdf915aab (patch)
treed398e0b6c1d8590c237ff8611020621d942078f1 /src/zenstore
parentimplemented openssl-free encryption for Windows (#520) (diff)
downloadzen-b8460468bcdb9f331d06afb2b3b9967bdf915aab.tar.xz
zen-b8460468bcdb9f331d06afb2b3b9967bdf915aab.zip
disk layer gc and error/warnings cleanup (#515)
- Improvement: Use GC reserve when writing index/manifest for a disk cache bucket when disk is low when available - Improvement: Demote errors to warning for issues that are not critical and we handle gracefully - Improvement: Treat more out of memory errors from windows as Out Of Memory errors Fixed wrong sizeof() statement for compactcas index (luckily the two structs are of same size)
Diffstat (limited to 'src/zenstore')
-rw-r--r--src/zenstore/compactcas.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zenstore/compactcas.cpp b/src/zenstore/compactcas.cpp
index de2800895..00a018948 100644
--- a/src/zenstore/compactcas.cpp
+++ b/src/zenstore/compactcas.cpp
@@ -885,8 +885,8 @@ CasContainerStrategy::MakeIndexSnapshot()
Header.Checksum = CasDiskIndexHeader::ComputeChecksum(Header);
- ObjectIndexFile.Write(&Header, sizeof(CasDiskIndexEntry), 0);
- ObjectIndexFile.Write(Entries.data(), Entries.size() * sizeof(CasDiskIndexEntry), sizeof(CasDiskIndexEntry));
+ ObjectIndexFile.Write(&Header, sizeof(CasDiskIndexHeader), 0);
+ ObjectIndexFile.Write(Entries.data(), Entries.size() * sizeof(CasDiskIndexEntry), sizeof(CasDiskIndexHeader));
ObjectIndexFile.Flush();
ObjectIndexFile.Close();
EntryCount = Entries.size();