aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/cache/structuredcachestore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-04-26 10:12:03 +0200
committerGitHub Enterprise <[email protected]>2024-04-26 10:12:03 +0200
commitef1b4234c851131cf5a6d249684c14c5c27d2878 (patch)
treeafd972c077b2585c2dc336b79eb1d31d02372295 /src/zenstore/cache/structuredcachestore.cpp
parentfix oplog import during gcv2 (#62) (diff)
downloadzen-ef1b4234c851131cf5a6d249684c14c5c27d2878.tar.xz
zen-ef1b4234c851131cf5a6d249684c14c5c27d2878.zip
use direct file access for large file hash (#63)
- Improvement: Refactor `IoHash::HashBuffer` and `BLAKE3::HashBuffer` to not use memory mapped files. Performs better and saves ~10% of oplog export time on CI
Diffstat (limited to 'src/zenstore/cache/structuredcachestore.cpp')
-rw-r--r--src/zenstore/cache/structuredcachestore.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/zenstore/cache/structuredcachestore.cpp b/src/zenstore/cache/structuredcachestore.cpp
index c4ee6f4d3..e7524271e 100644
--- a/src/zenstore/cache/structuredcachestore.cpp
+++ b/src/zenstore/cache/structuredcachestore.cpp
@@ -1233,7 +1233,7 @@ TEST_CASE_TEMPLATE("cachestore.threadedinsert", GCV2, FalseType, TrueType) // *
while (true)
{
IoBuffer Chunk = CreateRandomBlob(kChunkSize);
- IoHash Hash = HashBuffer(Chunk);
+ IoHash Hash = IoHash::HashBuffer(Chunk);
if (Chunks.contains(Hash))
{
continue;
@@ -1244,7 +1244,7 @@ TEST_CASE_TEMPLATE("cachestore.threadedinsert", GCV2, FalseType, TrueType) // *
while (true)
{
IoBuffer Chunk = CreateRandomBlob(kChunkSize);
- IoHash Hash = HashBuffer(Chunk);
+ IoHash Hash = IoHash::HashBuffer(Chunk);
if (Chunks.contains(Hash))
{
continue;
@@ -1347,12 +1347,12 @@ TEST_CASE_TEMPLATE("cachestore.threadedinsert", GCV2, FalseType, TrueType) // *
{
{
IoBuffer Chunk = CreateRandomBlob(kChunkSize);
- IoHash Hash = HashBuffer(Chunk);
+ IoHash Hash = IoHash::HashBuffer(Chunk);
NewChunks[Hash] = {.Bucket = Bucket1, .Buffer = Chunk};
}
{
IoBuffer Chunk = CreateRandomBlob(kChunkSize);
- IoHash Hash = HashBuffer(Chunk);
+ IoHash Hash = IoHash::HashBuffer(Chunk);
NewChunks[Hash] = {.Bucket = Bucket2, .Buffer = Chunk};
}
}