aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/zenremotestore/projectstore/remoteprojectstore.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zenremotestore/projectstore/remoteprojectstore.cpp b/src/zenremotestore/projectstore/remoteprojectstore.cpp
index 30c8e2f6d..935af9af0 100644
--- a/src/zenremotestore/projectstore/remoteprojectstore.cpp
+++ b/src/zenremotestore/projectstore/remoteprojectstore.cpp
@@ -2152,6 +2152,11 @@ namespace remotestore_impl {
ChunkBlockDescription Block;
CompressedBuffer CompressedBlock = GenerateChunkBlock(std::move(Chunks), Block);
uint64_t BlockSize = CompressedBlock.GetCompressedSize();
+ {
+ // We can share the lock as we are not resizing the vector and only touch our own index
+ RwLock::SharedLockScope __(SectionsLock);
+ Blocks[BlockIndex] = Block;
+ }
AsyncOnBlock(std::move(CompressedBlock), std::move(Block));
ZEN_INFO("Generated block with {} attachments in {} ({})",
ChunkCount,