aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-10-05 16:03:14 +0200
committerGitHub <[email protected]>2023-10-05 16:03:14 +0200
commitba22ffd43e646fe035f8457f3a89500c1cb1c120 (patch)
tree87535bbcc78683c6eabaaf4d27b90da9aeb94077 /src/zenstore/include
parentFix curruption of disk cache bucket index on GC (#448) (diff)
downloadzen-ba22ffd43e646fe035f8457f3a89500c1cb1c120.tar.xz
zen-ba22ffd43e646fe035f8457f3a89500c1cb1c120.zip
check that block does not exists on disk before starting write to it (#449)
* check that block does not exists on disk before starting write to it
Diffstat (limited to 'src/zenstore/include')
-rw-r--r--src/zenstore/include/zenstore/blockstore.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/zenstore/include/zenstore/blockstore.h b/src/zenstore/include/zenstore/blockstore.h
index 6fc0652f2..a2dea86c1 100644
--- a/src/zenstore/include/zenstore/blockstore.h
+++ b/src/zenstore/include/zenstore/blockstore.h
@@ -161,6 +161,8 @@ public:
inline uint64_t TotalSize() const { return m_TotalSize.load(std::memory_order::relaxed); }
private:
+ uint32_t GetFreeBlockIndex(uint32_t StartProbeIndex, RwLock::ExclusiveLockScope&, std::filesystem::path& OutBlockPath) const;
+
std::unordered_map<uint32_t, Ref<BlockStoreFile>> m_ChunkBlocks;
mutable RwLock m_InsertLock; // used to serialize inserts