aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-08-13 10:03:20 +0200
committerGitHub Enterprise <[email protected]>2024-08-13 10:03:20 +0200
commit9707f61a0fceb1f8599239196f487ff0c439cd27 (patch)
tree4a089777956d266cd48c26ed2924e12a40861c78
parentadd compacting of oplogs as part of GC (#106) (diff)
downloadzen-9707f61a0fceb1f8599239196f487ff0c439cd27.tar.xz
zen-9707f61a0fceb1f8599239196f487ff0c439cd27.zip
don't try to memcache the empty buffer if invalid format (#110)
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/zenstore/cache/cachedisklayer.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 321a64723..1b1a8bba9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@
- Bugfix: Fix ASSERT that would trigger in GC under certain conditions if source block was empty
- Bugfix: Skip and report invalid configurations for workspaces instead of crashing
- Bugfix: Report back error to http caller if removal of oplog fails
+- Bugfix: If a cache bucket value fails validation - don't try to memcache the empty buffer
- Bugfix: Skip chunk in block stores when iterating a block if the location is out of range
- Improvement: `zen workspace-share create` now resolves relative root paths to absolute paths
- Improvement: Add better output/logging when failing to initialize shared mutex
diff --git a/src/zenstore/cache/cachedisklayer.cpp b/src/zenstore/cache/cachedisklayer.cpp
index 159f54422..94636bb59 100644
--- a/src/zenstore/cache/cachedisklayer.cpp
+++ b/src/zenstore/cache/cachedisklayer.cpp
@@ -1393,7 +1393,9 @@ ZenCacheDiskLayer::CacheBucket::EndGetBatch(GetBatchHandle* Batch) noexcept
{
if (!CompressedBuffer::ValidateCompressedHeader(OutValue.Value, OutValue.RawHash, OutValue.RawSize))
{
- OutValue = ZenCacheValue{};
+ OutValue = ZenCacheValue{};
+ AddToMemCache = false;
+ SetMetaInfo = false;
}
}
else