aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/cache/cachedisklayer.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-06-02 19:14:28 +0200
committerGitHub Enterprise <[email protected]>2025-06-02 19:14:28 +0200
commitac31b9db1055cad4e2226448c4d2f6d3af8b13f4 (patch)
tree9c9264ffc6a53694bf95970540f332cebd33b2b5 /src/zenstore/cache/cachedisklayer.cpp
parentstreaming none compressor (#414) (diff)
downloadzen-ac31b9db1055cad4e2226448c4d2f6d3af8b13f4.tar.xz
zen-ac31b9db1055cad4e2226448c4d2f6d3af8b13f4.zip
fix cachbucket mem hit count (#415)
* Don't count a miss twice for memory stats if the entry can't be found * changelog
Diffstat (limited to 'src/zenstore/cache/cachedisklayer.cpp')
-rw-r--r--src/zenstore/cache/cachedisklayer.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/zenstore/cache/cachedisklayer.cpp b/src/zenstore/cache/cachedisklayer.cpp
index f76ad5c7d..e973cee77 100644
--- a/src/zenstore/cache/cachedisklayer.cpp
+++ b/src/zenstore/cache/cachedisklayer.cpp
@@ -1436,6 +1436,13 @@ ZenCacheDiskLayer::CacheBucket::EndGetBatch(GetBatchHandle* Batch) noexcept
}
}
}
+ else
+ {
+ if (m_Configuration.MemCacheSizeThreshold > 0)
+ {
+ m_MemoryMissCount++;
+ }
+ }
}
}
@@ -1669,10 +1676,6 @@ ZenCacheDiskLayer::CacheBucket::EndGetBatch(GetBatchHandle* Batch) noexcept
else
{
m_DiskMissCount++;
- if (m_Configuration.MemCacheSizeThreshold > 0)
- {
- m_MemoryMissCount++;
- }
}
}
}