aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/projectstore/remoteprojectstore.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2025-03-06 17:27:59 +0100
committerStefan Boberg <[email protected]>2025-03-06 17:27:59 +0100
commit66e5d1f4e288e0c32f854ebe3b63584b42b83554 (patch)
treed67e9d358419b5baccd429d54988414e0d7cd7a6 /src/zenserver/projectstore/remoteprojectstore.cpp
parentreduced memory churn using fixed_xxx containers (#236) (diff)
downloadzen-66e5d1f4e288e0c32f854ebe3b63584b42b83554.tar.xz
zen-66e5d1f4e288e0c32f854ebe3b63584b42b83554.zip
switched std::vector -> eastl::vector
Diffstat (limited to 'src/zenserver/projectstore/remoteprojectstore.cpp')
-rw-r--r--src/zenserver/projectstore/remoteprojectstore.cpp264
1 files changed, 132 insertions, 132 deletions
diff --git a/src/zenserver/projectstore/remoteprojectstore.cpp b/src/zenserver/projectstore/remoteprojectstore.cpp
index a7263da83..41f20d760 100644
--- a/src/zenserver/projectstore/remoteprojectstore.cpp
+++ b/src/zenserver/projectstore/remoteprojectstore.cpp
@@ -143,7 +143,7 @@ namespace remotestore_impl {
NiceBytes(Stats.m_PeakReceivedBytes));
}
- size_t AddBlock(RwLock& BlocksLock, std::vector<ChunkBlockDescription>& Blocks)
+ size_t AddBlock(RwLock& BlocksLock, eastl::vector<ChunkBlockDescription>& Blocks)
{
size_t BlockIndex;
{
@@ -165,21 +165,21 @@ namespace remotestore_impl {
ReportMessage(OptionalContext, fmt::format("Writing {} ops to oplog", OpCount));
- const size_t OpsBatchSize = 8192;
- std::vector<uint8_t> OpsData;
- std::vector<size_t> OpDataOffsets;
- size_t OpsCompleteCount = 0;
+ const size_t OpsBatchSize = 8192;
+ eastl::vector<uint8_t> OpsData;
+ eastl::vector<size_t> OpDataOffsets;
+ size_t OpsCompleteCount = 0;
OpsData.reserve(OpsBatchSize);
auto AppendBatch = [&]() {
- std::vector<CbObjectView> Ops;
+ eastl::vector<CbObjectView> Ops;
Ops.reserve(OpDataOffsets.size());
for (size_t OpDataOffset : OpDataOffsets)
{
Ops.emplace_back(CbObjectView(&OpsData[OpDataOffset]));
}
- std::vector<uint32_t> OpLsns = Oplog.AppendNewOplogEntries(Ops);
+ eastl::vector<uint32_t> OpLsns = Oplog.AppendNewOplogEntries(Ops);
OpsCompleteCount += OpLsns.size();
OpsData.clear();
OpDataOffsets.clear();
@@ -229,19 +229,19 @@ namespace remotestore_impl {
std::atomic_size_t MissingAttachmentCount = 0;
};
- void DownloadAndSaveBlockChunks(CidStore& ChunkStore,
- RemoteProjectStore& RemoteStore,
- bool IgnoreMissingAttachments,
- JobContext* OptionalContext,
- WorkerThreadPool& NetworkWorkerPool,
- WorkerThreadPool& WorkerPool,
- Latch& AttachmentsDownloadLatch,
- Latch& AttachmentsWriteLatch,
- AsyncRemoteResult& RemoteResult,
- DownloadInfo& Info,
- Stopwatch& LoadAttachmentsTimer,
- std::atomic_uint64_t& DownloadStartMS,
- const std::vector<IoHash>& Chunks)
+ void DownloadAndSaveBlockChunks(CidStore& ChunkStore,
+ RemoteProjectStore& RemoteStore,
+ bool IgnoreMissingAttachments,
+ JobContext* OptionalContext,
+ WorkerThreadPool& NetworkWorkerPool,
+ WorkerThreadPool& WorkerPool,
+ Latch& AttachmentsDownloadLatch,
+ Latch& AttachmentsWriteLatch,
+ AsyncRemoteResult& RemoteResult,
+ DownloadInfo& Info,
+ Stopwatch& LoadAttachmentsTimer,
+ std::atomic_uint64_t& DownloadStartMS,
+ const eastl::vector<IoHash>& Chunks)
{
AttachmentsDownloadLatch.AddCount(1);
NetworkWorkerPool.ScheduleWork([&RemoteStore,
@@ -299,8 +299,8 @@ namespace remotestore_impl {
{
try
{
- std::vector<IoBuffer> WriteAttachmentBuffers;
- std::vector<IoHash> WriteRawHashes;
+ eastl::vector<IoBuffer> WriteAttachmentBuffers;
+ eastl::vector<IoHash> WriteRawHashes;
WriteAttachmentBuffers.reserve(Chunks.size());
WriteRawHashes.reserve(Chunks.size());
@@ -311,7 +311,7 @@ namespace remotestore_impl {
WriteAttachmentBuffers.push_back(It.second.GetCompressed().Flatten().AsIoBuffer());
WriteRawHashes.push_back(It.first);
}
- std::vector<CidStore::InsertResult> InsertResults =
+ eastl::vector<CidStore::InsertResult> InsertResults =
ChunkStore.AddChunks(WriteAttachmentBuffers, WriteRawHashes, CidStore::InsertMode::kCopyOnly);
for (size_t Index = 0; Index < InsertResults.size(); Index++)
@@ -341,21 +341,21 @@ namespace remotestore_impl {
});
};
- void DownloadAndSaveBlock(CidStore& ChunkStore,
- RemoteProjectStore& RemoteStore,
- bool IgnoreMissingAttachments,
- JobContext* OptionalContext,
- WorkerThreadPool& NetworkWorkerPool,
- WorkerThreadPool& WorkerPool,
- Latch& AttachmentsDownloadLatch,
- Latch& AttachmentsWriteLatch,
- AsyncRemoteResult& RemoteResult,
- DownloadInfo& Info,
- Stopwatch& LoadAttachmentsTimer,
- std::atomic_uint64_t& DownloadStartMS,
- const IoHash& BlockHash,
- const std::vector<IoHash>& Chunks,
- uint32_t RetriesLeft)
+ void DownloadAndSaveBlock(CidStore& ChunkStore,
+ RemoteProjectStore& RemoteStore,
+ bool IgnoreMissingAttachments,
+ JobContext* OptionalContext,
+ WorkerThreadPool& NetworkWorkerPool,
+ WorkerThreadPool& WorkerPool,
+ Latch& AttachmentsDownloadLatch,
+ Latch& AttachmentsWriteLatch,
+ AsyncRemoteResult& RemoteResult,
+ DownloadInfo& Info,
+ Stopwatch& LoadAttachmentsTimer,
+ std::atomic_uint64_t& DownloadStartMS,
+ const IoHash& BlockHash,
+ const eastl::vector<IoHash>& Chunks,
+ uint32_t RetriesLeft)
{
AttachmentsDownloadLatch.AddCount(1);
NetworkWorkerPool.ScheduleWork([&AttachmentsDownloadLatch,
@@ -437,8 +437,8 @@ namespace remotestore_impl {
std::unordered_set<IoHash, IoHash::Hasher> WantedChunks;
WantedChunks.reserve(Chunks.size());
WantedChunks.insert(Chunks.begin(), Chunks.end());
- std::vector<IoBuffer> WriteAttachmentBuffers;
- std::vector<IoHash> WriteRawHashes;
+ eastl::vector<IoBuffer> WriteAttachmentBuffers;
+ eastl::vector<IoHash> WriteRawHashes;
IoHash RawHash;
uint64_t RawSize;
@@ -685,9 +685,9 @@ namespace remotestore_impl {
void CreateBlock(WorkerThreadPool& WorkerPool,
Latch& OpSectionsLatch,
- std::vector<std::pair<IoHash, FetchChunkFunc>>&& ChunksInBlock,
+ eastl::vector<std::pair<IoHash, FetchChunkFunc>>&& ChunksInBlock,
RwLock& SectionsLock,
- std::vector<ChunkBlockDescription>& Blocks,
+ eastl::vector<ChunkBlockDescription>& Blocks,
size_t BlockIndex,
const std::function<void(CompressedBuffer&&, ChunkBlockDescription&&)>& AsyncOnBlock,
AsyncRemoteResult& RemoteResult)
@@ -753,7 +753,7 @@ namespace remotestore_impl {
CidStore& ChunkStore,
RemoteProjectStore& RemoteStore,
const std::unordered_set<IoHash, IoHash::Hasher>& LargeAttachments,
- const std::vector<std::vector<std::pair<IoHash, FetchChunkFunc>>>& BlockChunks,
+ const eastl::vector<eastl::vector<std::pair<IoHash, FetchChunkFunc>>>& BlockChunks,
const std::unordered_map<IoHash, CreatedBlock, IoHash::Hasher>& CreatedBlocks,
const tsl::robin_map<IoHash, TGetAttachmentBufferFunc, IoHash::Hasher>& LooseFileAttachments,
const std::unordered_set<IoHash, IoHash::Hasher>& Needs,
@@ -799,7 +799,7 @@ namespace remotestore_impl {
UnknownAttachments.erase(LargeAttachment);
}
}
- for (const std::vector<std::pair<IoHash, FetchChunkFunc>>& BlockHashes : BlockChunks)
+ for (const eastl::vector<std::pair<IoHash, FetchChunkFunc>>& BlockHashes : BlockChunks)
{
for (const std::pair<IoHash, FetchChunkFunc>& Chunk : BlockHashes)
{
@@ -957,14 +957,14 @@ namespace remotestore_impl {
if (!BulkBlockAttachmentsToUpload.empty())
{
- for (const std::vector<std::pair<IoHash, FetchChunkFunc>>& Chunks : BlockChunks)
+ for (const eastl::vector<std::pair<IoHash, FetchChunkFunc>>& Chunks : BlockChunks)
{
if (RemoteResult.IsError())
{
break;
}
- std::vector<IoHash> NeededChunks;
+ eastl::vector<IoHash> NeededChunks;
NeededChunks.reserve(Chunks.size());
for (const std::pair<IoHash, FetchChunkFunc>& Chunk : Chunks)
{
@@ -996,8 +996,8 @@ namespace remotestore_impl {
}
try
{
- size_t ChunksSize = 0;
- std::vector<SharedBuffer> ChunkBuffers;
+ size_t ChunksSize = 0;
+ eastl::vector<SharedBuffer> ChunkBuffers;
ChunkBuffers.reserve(NeededChunks.size());
for (const IoHash& Chunk : NeededChunks)
{
@@ -1085,14 +1085,14 @@ namespace remotestore_impl {
} // namespace remotestore_impl
-std::vector<IoHash>
+eastl::vector<IoHash>
GetBlockHashesFromOplog(CbObjectView ContainerObject)
{
using namespace std::literals;
- std::vector<ChunkBlockDescription> Result;
- CbArrayView BlocksArray = ContainerObject["blocks"sv].AsArrayView();
+ eastl::vector<ChunkBlockDescription> Result;
+ CbArrayView BlocksArray = ContainerObject["blocks"sv].AsArrayView();
- std::vector<IoHash> BlockHashes;
+ eastl::vector<IoHash> BlockHashes;
BlockHashes.reserve(BlocksArray.Num());
for (CbFieldView BlockField : BlocksArray)
{
@@ -1103,13 +1103,13 @@ GetBlockHashesFromOplog(CbObjectView ContainerObject)
return BlockHashes;
}
-std::vector<ThinChunkBlockDescription>
+eastl::vector<ThinChunkBlockDescription>
GetBlocksFromOplog(CbObjectView ContainerObject, std::span<const IoHash> IncludeBlockHashes)
{
using namespace std::literals;
- std::vector<ThinChunkBlockDescription> Result;
- CbArrayView BlocksArray = ContainerObject["blocks"sv].AsArrayView();
- tsl::robin_set<IoHash, IoHash::Hasher> IncludeSet;
+ eastl::vector<ThinChunkBlockDescription> Result;
+ CbArrayView BlocksArray = ContainerObject["blocks"sv].AsArrayView();
+ tsl::robin_set<IoHash, IoHash::Hasher> IncludeSet;
IncludeSet.insert(IncludeBlockHashes.begin(), IncludeBlockHashes.end());
Result.reserve(IncludeBlockHashes.size());
@@ -1119,8 +1119,8 @@ GetBlocksFromOplog(CbObjectView ContainerObject, std::span<const IoHash> Include
IoHash BlockHash = BlockView["rawhash"sv].AsBinaryAttachment();
if (IncludeSet.contains(BlockHash))
{
- std::vector<IoHash> ChunkHashes;
- CbArrayView ChunksArray = BlockView["chunks"sv].AsArrayView();
+ eastl::vector<IoHash> ChunkHashes;
+ CbArrayView ChunksArray = BlockView["chunks"sv].AsArrayView();
if (BlockHash == IoHash::Zero)
{
continue;
@@ -1137,23 +1137,23 @@ GetBlocksFromOplog(CbObjectView ContainerObject, std::span<const IoHash> Include
}
CbObject
-BuildContainer(CidStore& ChunkStore,
- ProjectStore::Project& Project,
- ProjectStore::Oplog& Oplog,
- size_t MaxBlockSize,
- size_t MaxChunkEmbedSize,
- size_t ChunkFileSizeLimit,
- bool BuildBlocks,
- bool IgnoreMissingAttachments,
- bool AllowChunking,
- const std::vector<ThinChunkBlockDescription>& KnownBlocks,
- WorkerThreadPool& WorkerPool,
- const std::function<void(CompressedBuffer&&, ChunkBlockDescription&&)>& AsyncOnBlock,
- const std::function<void(const IoHash&, TGetAttachmentBufferFunc&&)>& OnLargeAttachment,
- const std::function<void(std::vector<std::pair<IoHash, FetchChunkFunc>>&&)>& OnBlockChunks,
- bool EmbedLooseFiles,
- JobContext* OptionalContext,
- remotestore_impl::AsyncRemoteResult& RemoteResult)
+BuildContainer(CidStore& ChunkStore,
+ ProjectStore::Project& Project,
+ ProjectStore::Oplog& Oplog,
+ size_t MaxBlockSize,
+ size_t MaxChunkEmbedSize,
+ size_t ChunkFileSizeLimit,
+ bool BuildBlocks,
+ bool IgnoreMissingAttachments,
+ bool AllowChunking,
+ const eastl::vector<ThinChunkBlockDescription>& KnownBlocks,
+ WorkerThreadPool& WorkerPool,
+ const std::function<void(CompressedBuffer&&, ChunkBlockDescription&&)>& AsyncOnBlock,
+ const std::function<void(const IoHash&, TGetAttachmentBufferFunc&&)>& OnLargeAttachment,
+ const std::function<void(eastl::vector<std::pair<IoHash, FetchChunkFunc>>&&)>& OnBlockChunks,
+ bool EmbedLooseFiles,
+ JobContext* OptionalContext,
+ remotestore_impl::AsyncRemoteResult& RemoteResult)
{
using namespace std::literals;
@@ -1170,9 +1170,9 @@ BuildContainer(CidStore& ChunkStore,
std::unordered_map<IoHash, FoundAttachment, IoHash::Hasher> UploadAttachments;
- RwLock BlocksLock;
- std::vector<ChunkBlockDescription> Blocks;
- CompressedBuffer OpsBuffer;
+ RwLock BlocksLock;
+ eastl::vector<ChunkBlockDescription> Blocks;
+ CompressedBuffer OpsBuffer;
std::filesystem::path AttachmentTempPath = Oplog.TempPath();
AttachmentTempPath.append(".pending");
@@ -1388,10 +1388,10 @@ BuildContainer(CidStore& ChunkStore,
return {};
}
- auto FindReuseBlocks = [](const std::vector<ThinChunkBlockDescription>& KnownBlocks,
+ auto FindReuseBlocks = [](const eastl::vector<ThinChunkBlockDescription>& KnownBlocks,
const std::unordered_set<IoHash, IoHash::Hasher>& Attachments,
- JobContext* OptionalContext) -> std::vector<size_t> {
- std::vector<size_t> ReuseBlockIndexes;
+ JobContext* OptionalContext) -> eastl::vector<size_t> {
+ eastl::vector<size_t> ReuseBlockIndexes;
if (!Attachments.empty() && !KnownBlocks.empty())
{
remotestore_impl::ReportMessage(
@@ -1445,8 +1445,8 @@ BuildContainer(CidStore& ChunkStore,
FoundHashes.insert(It.first);
}
- size_t ReusedAttachmentCount = 0;
- std::vector<size_t> ReusedBlockIndexes = FindReuseBlocks(KnownBlocks, FoundHashes, OptionalContext);
+ size_t ReusedAttachmentCount = 0;
+ eastl::vector<size_t> ReusedBlockIndexes = FindReuseBlocks(KnownBlocks, FoundHashes, OptionalContext);
for (size_t KnownBlockIndex : ReusedBlockIndexes)
{
const ThinChunkBlockDescription& KnownBlock = KnownBlocks[KnownBlockIndex];
@@ -1466,7 +1466,7 @@ BuildContainer(CidStore& ChunkStore,
ChunkedInfoWithSource Chunked;
tsl::robin_map<IoHash, uint32_t, IoHash::Hasher> ChunkLoookup;
};
- std::vector<ChunkedFile> ChunkedFiles;
+ eastl::vector<ChunkedFile> ChunkedFiles;
auto ChunkFile = [](const IoHash& RawHash, IoBuffer& RawData, const IoBufferFileReference& FileRef, JobContext*) -> ChunkedFile {
ChunkedFile Chunked;
@@ -1783,7 +1783,7 @@ BuildContainer(CidStore& ChunkStore,
UploadAttachments.erase(It);
}
- std::vector<size_t> ReusedBlockFromChunking = FindReuseBlocks(KnownBlocks, ChunkedHashes, OptionalContext);
+ eastl::vector<size_t> ReusedBlockFromChunking = FindReuseBlocks(KnownBlocks, ChunkedHashes, OptionalContext);
for (size_t KnownBlockIndex : ReusedBlockIndexes)
{
const ThinChunkBlockDescription& KnownBlock = KnownBlocks[KnownBlockIndex];
@@ -1811,7 +1811,7 @@ BuildContainer(CidStore& ChunkStore,
fmt::format("Reused {} attachments from {} blocks", ReusedAttachmentCount, ReuseBlockCount));
}
- std::vector<std::pair<IoHash, Oid>> SortedUploadAttachments;
+ eastl::vector<std::pair<IoHash, Oid>> SortedUploadAttachments;
SortedUploadAttachments.reserve(UploadAttachments.size());
for (const auto& It : UploadAttachments)
{
@@ -1842,7 +1842,7 @@ BuildContainer(CidStore& ChunkStore,
return Lhs.second < Rhs.second;
});
- std::vector<size_t> ChunkedFilesOrder;
+ eastl::vector<size_t> ChunkedFilesOrder;
ChunkedFilesOrder.reserve(ChunkedFiles.size());
for (size_t Index = 0; Index < ChunkedFiles.size(); Index++)
{
@@ -1885,10 +1885,10 @@ BuildContainer(CidStore& ChunkStore,
remotestore_impl::ReportMessage(OptionalContext,
fmt::format("Assembling {} attachments from {} ops into blocks", ChunkAssembleCount, TotalOpCount));
- Latch BlockCreateLatch(1);
- size_t GeneratedBlockCount = 0;
- size_t BlockSize = 0;
- std::vector<std::pair<IoHash, FetchChunkFunc>> ChunksInBlock;
+ Latch BlockCreateLatch(1);
+ size_t GeneratedBlockCount = 0;
+ size_t BlockSize = 0;
+ eastl::vector<std::pair<IoHash, FetchChunkFunc>> ChunksInBlock;
Oid LastOpKey = Oid::Zero;
uint32_t ComposedBlocks = 0;
@@ -2252,19 +2252,19 @@ BuildContainer(CidStore& ChunkStore,
}
RemoteProjectStore::LoadContainerResult
-BuildContainer(CidStore& ChunkStore,
- ProjectStore::Project& Project,
- ProjectStore::Oplog& Oplog,
- size_t MaxBlockSize,
- size_t MaxChunkEmbedSize,
- size_t ChunkFileSizeLimit,
- bool BuildBlocks,
- bool IgnoreMissingAttachments,
- bool AllowChunking,
- const std::function<void(CompressedBuffer&&, ChunkBlockDescription&&)>& AsyncOnBlock,
- const std::function<void(const IoHash&, TGetAttachmentBufferFunc&&)>& OnLargeAttachment,
- const std::function<void(std::vector<std::pair<IoHash, FetchChunkFunc>>&&)>& OnBlockChunks,
- bool EmbedLooseFiles)
+BuildContainer(CidStore& ChunkStore,
+ ProjectStore::Project& Project,
+ ProjectStore::Oplog& Oplog,
+ size_t MaxBlockSize,
+ size_t MaxChunkEmbedSize,
+ size_t ChunkFileSizeLimit,
+ bool BuildBlocks,
+ bool IgnoreMissingAttachments,
+ bool AllowChunking,
+ const std::function<void(CompressedBuffer&&, ChunkBlockDescription&&)>& AsyncOnBlock,
+ const std::function<void(const IoHash&, TGetAttachmentBufferFunc&&)>& OnLargeAttachment,
+ const std::function<void(eastl::vector<std::pair<IoHash, FetchChunkFunc>>&&)>& OnBlockChunks,
+ bool EmbedLooseFiles)
{
WorkerThreadPool& WorkerPool = GetLargeWorkerPool(EWorkloadType::Background);
@@ -2365,8 +2365,8 @@ SaveOplog(CidStore& ChunkStore,
ZEN_DEBUG("Saved block {}, {}", BlockHash, NiceBytes(CompressedBlock.GetCompressedSize()));
};
- std::vector<std::vector<std::pair<IoHash, FetchChunkFunc>>> BlockChunks;
- auto OnBlockChunks = [&BlockChunks](std::vector<std::pair<IoHash, FetchChunkFunc>>&& Chunks) {
+ eastl::vector<eastl::vector<std::pair<IoHash, FetchChunkFunc>>> BlockChunks;
+ auto OnBlockChunks = [&BlockChunks](eastl::vector<std::pair<IoHash, FetchChunkFunc>>&& Chunks) {
BlockChunks.push_back({Chunks.begin(), Chunks.end()});
ZEN_DEBUG("Found {} block chunks", Chunks.size());
};
@@ -2391,7 +2391,7 @@ SaveOplog(CidStore& ChunkStore,
OnBlock = UploadBlock;
}
- std::vector<ThinChunkBlockDescription> KnownBlocks;
+ eastl::vector<ThinChunkBlockDescription> KnownBlocks;
uint64_t TransferWallTimeMS = 0;
@@ -2633,14 +2633,14 @@ SaveOplog(CidStore& ChunkStore,
};
RemoteProjectStore::Result
-ParseOplogContainer(const CbObject& ContainerObject,
- const std::function<void(std::span<IoHash> RawHashes)>& OnReferencedAttachments,
- const std::function<bool(const IoHash& RawHash)>& HasAttachment,
- const std::function<void(const IoHash& BlockHash, std::vector<IoHash>&& Chunks)>& OnNeedBlock,
- const std::function<void(const IoHash& RawHash)>& OnNeedAttachment,
- const std::function<void(const ChunkedInfo&)>& OnChunkedAttachment,
- CbObject& OutOplogSection,
- JobContext* OptionalContext)
+ParseOplogContainer(const CbObject& ContainerObject,
+ const std::function<void(std::span<IoHash> RawHashes)>& OnReferencedAttachments,
+ const std::function<bool(const IoHash& RawHash)>& HasAttachment,
+ const std::function<void(const IoHash& BlockHash, eastl::vector<IoHash>&& Chunks)>& OnNeedBlock,
+ const std::function<void(const IoHash& RawHash)>& OnNeedAttachment,
+ const std::function<void(const ChunkedInfo&)>& OnChunkedAttachment,
+ CbObject& OutOplogSection,
+ JobContext* OptionalContext)
{
using namespace std::literals;
@@ -2672,7 +2672,7 @@ ParseOplogContainer(const CbObject& ContainerObject,
}
}
{
- std::vector<IoHash> ReferencedAttachments(OpsAttachments.begin(), OpsAttachments.end());
+ eastl::vector<IoHash> ReferencedAttachments(OpsAttachments.begin(), OpsAttachments.end());
OnReferencedAttachments(ReferencedAttachments);
}
remotestore_impl::ReportMessage(OptionalContext, fmt::format("Oplog references {} attachments", OpsAttachments.size()));
@@ -2721,7 +2721,7 @@ ParseOplogContainer(const CbObject& ContainerObject,
CbArrayView ChunksArray = BlockView["chunks"sv].AsArrayView();
- std::vector<IoHash> NeededChunks;
+ eastl::vector<IoHash> NeededChunks;
NeededChunks.reserve(ChunksArray.Num());
if (BlockHash == IoHash::Zero)
{
@@ -2776,14 +2776,14 @@ ParseOplogContainer(const CbObject& ContainerObject,
}
RemoteProjectStore::Result
-SaveOplogContainer(ProjectStore::Oplog& Oplog,
- const CbObject& ContainerObject,
- const std::function<void(std::span<IoHash> RawHashes)>& OnReferencedAttachments,
- const std::function<bool(const IoHash& RawHash)>& HasAttachment,
- const std::function<void(const IoHash& BlockHash, std::vector<IoHash>&& Chunks)>& OnNeedBlock,
- const std::function<void(const IoHash& RawHash)>& OnNeedAttachment,
- const std::function<void(const ChunkedInfo&)>& OnChunkedAttachment,
- JobContext* OptionalContext)
+SaveOplogContainer(ProjectStore::Oplog& Oplog,
+ const CbObject& ContainerObject,
+ const std::function<void(std::span<IoHash> RawHashes)>& OnReferencedAttachments,
+ const std::function<bool(const IoHash& RawHash)>& HasAttachment,
+ const std::function<void(const IoHash& BlockHash, eastl::vector<IoHash>&& Chunks)>& OnNeedBlock,
+ const std::function<void(const IoHash& RawHash)>& OnNeedAttachment,
+ const std::function<void(const ChunkedInfo&)>& OnChunkedAttachment,
+ JobContext* OptionalContext)
{
using namespace std::literals;
@@ -2884,7 +2884,7 @@ LoadOplog(CidStore& ChunkStore,
&LoadAttachmentsTimer,
&DownloadStartMS,
IgnoreMissingAttachments,
- OptionalContext](const IoHash& BlockHash, std::vector<IoHash>&& Chunks) {
+ OptionalContext](const IoHash& BlockHash, eastl::vector<IoHash>&& Chunks) {
if (RemoteResult.IsError())
{
return;
@@ -2967,12 +2967,12 @@ LoadOplog(CidStore& ChunkStore,
RawHash);
};
- std::vector<ChunkedInfo> FilesToDechunk;
- auto OnChunkedAttachment = [&Oplog, &ChunkStore, &FilesToDechunk, ForceDownload](const ChunkedInfo& Chunked) {
- if (ForceDownload || !ChunkStore.ContainsChunk(Chunked.RawHash))
- {
- FilesToDechunk.push_back(Chunked);
- }
+ eastl::vector<ChunkedInfo> FilesToDechunk;
+ auto OnChunkedAttachment = [&Oplog, &ChunkStore, &FilesToDechunk, ForceDownload](const ChunkedInfo& Chunked) {
+ if (ForceDownload || !ChunkStore.ContainsChunk(Chunked.RawHash))
+ {
+ FilesToDechunk.push_back(Chunked);
+ }
};
auto OnReferencedAttachments = [&Oplog](std::span<IoHash> RawHashes) { Oplog.CaptureAddedAttachments(RawHashes); };