aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/cache/cachedisklayer.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-10-09 09:40:59 +0200
committerGitHub Enterprise <[email protected]>2024-10-09 09:40:59 +0200
commit2ca4e1c088b6726d44c6f475ff1106374444b1a2 (patch)
tree9d1239c09adac8d21b85a5db8f9b209c23825399 /src/zenstore/cache/cachedisklayer.cpp
parentremove temporary workaround involving _LIBCPP_DISABLE_AVAILABILITY (#191) (diff)
downloadzen-2ca4e1c088b6726d44c6f475ff1106374444b1a2.tar.xz
zen-2ca4e1c088b6726d44c6f475ff1106374444b1a2.zip
don't read chunks into memory during cache batch fetch unless we may cache them in memory (#188)
* Don't read chunks into memory during cache batch fetch unless we may cache them in memory
Diffstat (limited to 'src/zenstore/cache/cachedisklayer.cpp')
-rw-r--r--src/zenstore/cache/cachedisklayer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/zenstore/cache/cachedisklayer.cpp b/src/zenstore/cache/cachedisklayer.cpp
index 8a2de34e2..9161905d7 100644
--- a/src/zenstore/cache/cachedisklayer.cpp
+++ b/src/zenstore/cache/cachedisklayer.cpp
@@ -1503,7 +1503,8 @@ ZenCacheDiskLayer::CacheBucket::EndGetBatch(GetBatchHandle* Batch) noexcept
{
ZEN_TRACE_CPU("Z$::Bucket::EndGetBatch::ReadInline");
m_BlockStore.IterateChunks(InlineBlockLocations, [&](uint32_t, std::span<const size_t> ChunkIndexes) -> bool {
- const uint64_t LargeChunkSizeLimit = Max(m_Configuration.MemCacheSizeThreshold, 32u * 1024u);
+ // Only read into memory the IoBuffers we could potentially add to memcache
+ const uint64_t LargeChunkSizeLimit = Max(m_Configuration.MemCacheSizeThreshold, 1u * 1024u);
m_BlockStore.IterateBlock(
InlineBlockLocations,
ChunkIndexes,