diff options
| author | Dan Engelbrecht <[email protected]> | 2024-04-22 20:21:02 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-04-22 20:21:02 +0200 |
| commit | 96f44f2f2d8cbcda254d0b193f5a1aece645daeb (patch) | |
| tree | 9d1975c4d76d7a577ecfe8e2fe9456738571528b /src/zenstore/compactcas.h | |
| parent | fix LogRemoteStoreStatsDetails (#53) (diff) | |
| download | zen-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.h | 21 |
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 |