aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/compactcas.h
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-04-22 20:21:02 +0200
committerGitHub Enterprise <[email protected]>2024-04-22 20:21:02 +0200
commit96f44f2f2d8cbcda254d0b193f5a1aece645daeb (patch)
tree9d1975c4d76d7a577ecfe8e2fe9456738571528b /src/zenstore/compactcas.h
parentfix LogRemoteStoreStatsDetails (#53) (diff)
downloadzen-96f44f2f2d8cbcda254d0b193f5a1aece645daeb.tar.xz
zen-96f44f2f2d8cbcda254d0b193f5a1aece645daeb.zip
InsertChunks for CAS store (#55)
- Improvement: Add batching when writing multiple small chunks to block store - decreases I/O load significantly on oplog import
Diffstat (limited to 'src/zenstore/compactcas.h')
-rw-r--r--src/zenstore/compactcas.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/zenstore/compactcas.h b/src/zenstore/compactcas.h
index 932844da7..eb1d36b31 100644
--- a/src/zenstore/compactcas.h
+++ b/src/zenstore/compactcas.h
@@ -51,16 +51,17 @@ struct CasContainerStrategy final : public GcStorage, public GcReferenceStore
CasContainerStrategy(GcManager& Gc);
~CasContainerStrategy();
- CasStore::InsertResult InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash);
- IoBuffer FindChunk(const IoHash& ChunkHash);
- bool HaveChunk(const IoHash& ChunkHash);
- void FilterChunks(HashKeySet& InOutChunks);
- void Initialize(const std::filesystem::path& RootDirectory,
- const std::string_view ContainerBaseName,
- uint32_t MaxBlockSize,
- uint32_t Alignment,
- bool IsNewStore);
- void Flush();
+ CasStore::InsertResult InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash);
+ std::vector<CasStore::InsertResult> InsertChunks(std::span<IoBuffer> Chunks, std::span<IoHash> ChunkHashes);
+ IoBuffer FindChunk(const IoHash& ChunkHash);
+ bool HaveChunk(const IoHash& ChunkHash);
+ void FilterChunks(HashKeySet& InOutChunks);
+ void Initialize(const std::filesystem::path& RootDirectory,
+ const std::string_view ContainerBaseName,
+ uint32_t MaxBlockSize,
+ uint32_t Alignment,
+ bool IsNewStore);
+ void Flush();
// GcStorage