aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/cas.cpp
diff options
context:
space:
mode:
authorzousar <[email protected]>2025-06-24 16:26:29 -0600
committerzousar <[email protected]>2025-06-24 16:26:29 -0600
commitbb298631ba35a323827dda0b8cd6158e276b5f61 (patch)
tree7ba8db91c44ce83f2c518f80f80ab14910eefa6f /src/zenstore/cas.cpp
parentChange to PutResult structure (diff)
parent5.6.14 (diff)
downloadzen-bb298631ba35a323827dda0b8cd6158e276b5f61.tar.xz
zen-bb298631ba35a323827dda0b8cd6158e276b5f61.zip
Merge branch 'main' into zs/put-overwrite-policy
Diffstat (limited to 'src/zenstore/cas.cpp')
-rw-r--r--src/zenstore/cas.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/zenstore/cas.cpp b/src/zenstore/cas.cpp
index 73c10a6db..460f0e10d 100644
--- a/src/zenstore/cas.cpp
+++ b/src/zenstore/cas.cpp
@@ -118,7 +118,7 @@ CasImpl::Initialize(const CidStoreConfiguration& InConfig)
// Ensure root directory exists - create if it doesn't exist already
- std::filesystem::create_directories(m_Config.RootDirectory);
+ CreateDirectories(m_Config.RootDirectory);
// Open or create manifest
@@ -412,6 +412,7 @@ CasImpl::IterateChunks(std::span<IoHash> DecompressedIds,
uint64_t LargeSizeLimit)
{
ZEN_TRACE_CPU("CAS::IterateChunks");
+
if (!m_SmallStrategy.IterateChunks(
DecompressedIds,
[&](size_t Index, const IoBuffer& Payload) {
@@ -420,10 +421,11 @@ CasImpl::IterateChunks(std::span<IoHash> DecompressedIds,
return AsyncCallback(Index, Payload);
},
OptionalWorkerPool,
- LargeSizeLimit))
+ LargeSizeLimit == 0 ? m_Config.HugeValueThreshold : Min(LargeSizeLimit, m_Config.HugeValueThreshold)))
{
return false;
}
+
if (!m_TinyStrategy.IterateChunks(
DecompressedIds,
[&](size_t Index, const IoBuffer& Payload) {
@@ -432,10 +434,11 @@ CasImpl::IterateChunks(std::span<IoHash> DecompressedIds,
return AsyncCallback(Index, Payload);
},
OptionalWorkerPool,
- LargeSizeLimit))
+ LargeSizeLimit == 0 ? m_Config.TinyValueThreshold : Min(LargeSizeLimit, m_Config.TinyValueThreshold)))
{
return false;
}
+
if (!m_LargeStrategy.IterateChunks(
DecompressedIds,
[&](size_t Index, const IoBuffer& Payload) {