aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/filecas.h
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-04-24 13:53:54 +0200
committerGitHub Enterprise <[email protected]>2024-04-24 13:53:54 +0200
commit1c0ddc112a6c18d411f1f3ae6d236ecc2bedcfaa (patch)
treecfafeecb830a44a6d0870a217edabcc62d37669c /src/zenstore/filecas.h
parentremove obsolete code (diff)
downloadzen-1c0ddc112a6c18d411f1f3ae6d236ecc2bedcfaa.tar.xz
zen-1c0ddc112a6c18d411f1f3ae6d236ecc2bedcfaa.zip
iterate cas chunks (#59)
- Improvement: Reworked GetChunkInfos in oplog store to reduce disk thrashing and improve performance
Diffstat (limited to 'src/zenstore/filecas.h')
-rw-r--r--src/zenstore/filecas.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/zenstore/filecas.h b/src/zenstore/filecas.h
index 70cd4ef5a..06e35de23 100644
--- a/src/zenstore/filecas.h
+++ b/src/zenstore/filecas.h
@@ -39,10 +39,11 @@ struct FileCasStrategy final : public GcStorage, public GcReferenceStore
IoBuffer FindChunk(const IoHash& ChunkHash);
bool HaveChunk(const IoHash& ChunkHash);
void FilterChunks(HashKeySet& InOutChunks);
- void Flush();
- virtual void ScrubStorage(ScrubContext& ScrubCtx) override;
- virtual void CollectGarbage(GcContext& GcCtx) override;
- virtual GcStorageSize StorageSize() const override;
+ bool IterateChunks(std::span<IoHash> ChunkHashes, const std::function<bool(size_t Index, const IoBuffer& Payload)>& Callback);
+ void Flush();
+ virtual void ScrubStorage(ScrubContext& ScrubCtx) override;
+ virtual void CollectGarbage(GcContext& GcCtx) override;
+ virtual GcStorageSize StorageSize() const override;
virtual std::string GetGcName(GcCtx& Ctx) override;
virtual GcReferencePruner* CreateReferencePruner(GcCtx& Ctx, GcReferenceStoreStats& Stats) override;