diff options
| author | Stefan Boberg <[email protected]> | 2025-03-06 17:27:59 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2025-03-06 17:27:59 +0100 |
| commit | 66e5d1f4e288e0c32f854ebe3b63584b42b83554 (patch) | |
| tree | d67e9d358419b5baccd429d54988414e0d7cd7a6 /src/zenserver/projectstore/projectstore.cpp | |
| parent | reduced memory churn using fixed_xxx containers (#236) (diff) | |
| download | zen-66e5d1f4e288e0c32f854ebe3b63584b42b83554.tar.xz zen-66e5d1f4e288e0c32f854ebe3b63584b42b83554.zip | |
switched std::vector -> eastl::vector
Diffstat (limited to 'src/zenserver/projectstore/projectstore.cpp')
| -rw-r--r-- | src/zenserver/projectstore/projectstore.cpp | 380 |
1 files changed, 190 insertions, 190 deletions
diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp index 86791e29a..0c0c942af 100644 --- a/src/zenserver/projectstore/projectstore.cpp +++ b/src/zenserver/projectstore/projectstore.cpp @@ -617,7 +617,7 @@ struct ProjectStore::OplogStorage : public RefCounted try { - std::vector<OplogEntry> Ops; + eastl::vector<OplogEntry> Ops; Ops.reserve(LSNs.size()); tsl::robin_map<uint32_t, size_t> LSNToIndex; @@ -651,7 +651,7 @@ struct ProjectStore::OplogStorage : public RefCounted return Lhs.OpCoreOffset < Rhs.OpCoreOffset; }); - std::vector<uint32_t> OldLSNs; + eastl::vector<uint32_t> OldLSNs; OldLSNs.reserve(Ops.size()); uint64_t OpWriteOffset = 0; @@ -774,8 +774,8 @@ struct ProjectStore::OplogStorage : public RefCounted uint64_t OpsBlockSize = m_OpBlobs.FileSize(); - std::vector<OplogEntry> OpLogEntries; - uint64_t InvalidEntries = 0; + eastl::vector<OplogEntry> OpLogEntries; + uint64_t InvalidEntries = 0; { tsl::robin_map<Oid, size_t, Oid::Hasher> LatestKeys; @@ -993,14 +993,14 @@ struct ProjectStore::OplogStorage : public RefCounted return Entry; } - std::vector<OplogEntry> AppendOps(std::span<const AppendOpData> Ops) + eastl::vector<OplogEntry> AppendOps(std::span<const AppendOpData> Ops) { ZEN_MEMSCOPE(GetProjectstoreTag()); ZEN_TRACE_CPU("Store::OplogStorage::AppendOps"); - size_t OpCount = Ops.size(); - std::vector<std::pair<uint64_t, uint64_t>> OffsetAndSizes; - std::vector<uint32_t> OpLsns; + size_t OpCount = Ops.size(); + eastl::vector<std::pair<uint64_t, uint64_t>> OffsetAndSizes; + eastl::vector<uint32_t> OpLsns; OffsetAndSizes.resize(OpCount); OpLsns.resize(OpCount); @@ -1033,7 +1033,7 @@ struct ProjectStore::OplogStorage : public RefCounted IoBuffer WriteBuffer(WriteLength); - std::vector<OplogEntry> Entries; + eastl::vector<OplogEntry> Entries; Entries.resize(OpCount); for (size_t OpIndex = 0; OpIndex < OpCount; OpIndex++) { @@ -1157,14 +1157,14 @@ ProjectStore::Oplog::ScrubStorage(ScrubContext& Ctx) { ZEN_MEMSCOPE(GetProjectstoreTag()); - std::vector<Oid> BadEntryKeys; + eastl::vector<Oid> BadEntryKeys; using namespace std::literals; IterateOplogWithKey([&](uint32_t Lsn, const Oid& Key, CbObjectView Op) { ZEN_UNUSED(Lsn); - std::vector<IoHash> Cids; + eastl::vector<IoHash> Cids; Op.IterateAttachments([&](CbFieldView Visitor) { Cids.emplace_back(Visitor.AsAttachment()); }); { @@ -1488,10 +1488,10 @@ ProjectStore::Oplog::Validate(std::atomic_bool& IsCancelledFlag, WorkerThreadPoo ValidationResult Result; - std::vector<Oid> KeyHashes; - std::vector<std::string> Keys; - std::vector<std::vector<IoHash>> Attachments; - std::vector<OplogEntryMapping> Mappings; + eastl::vector<Oid> KeyHashes; + eastl::vector<std::string> Keys; + eastl::vector<eastl::vector<IoHash>> Attachments; + eastl::vector<OplogEntryMapping> Mappings; IterateOplogWithKey([&](uint32_t LSN, const Oid& Key, CbObjectView OpView) { Result.LSNLow = Min(Result.LSNLow, LSN); @@ -1499,7 +1499,7 @@ ProjectStore::Oplog::Validate(std::atomic_bool& IsCancelledFlag, WorkerThreadPoo KeyHashes.push_back(Key); Keys.emplace_back(std::string(OpView["key"sv].AsString())); - std::vector<IoHash> OpAttachments; + eastl::vector<IoHash> OpAttachments; OpView.IterateAttachments([&OpAttachments](CbFieldView Attachment) { OpAttachments.push_back(Attachment.AsAttachment()); }); Attachments.emplace_back(std::move(OpAttachments)); @@ -1551,7 +1551,7 @@ ProjectStore::Oplog::Validate(std::atomic_bool& IsCancelledFlag, WorkerThreadPoo } } } - const std::vector<IoHash>& OpAttachments = Attachments[OpIndex]; + const eastl::vector<IoHash>& OpAttachments = Attachments[OpIndex]; for (const IoHash& Attachment : OpAttachments) { if (IoBuffer Payload = m_CidStore.FindChunkByCid(Attachment); !Payload) @@ -1647,15 +1647,15 @@ ProjectStore::Oplog::WriteIndexSnapshot() } // Write the current state of the location map to a new index state - std::vector<uint32_t> LSNEntries; - std::vector<Oid> Keys; - std::vector<OplogEntryAddress> AddressMapEntries; - std::vector<uint32_t> LatestOpMapEntries; - std::vector<IoHash> ChunkMapEntries; - std::vector<IoHash> MetaMapEntries; - std::vector<uint32_t> FilePathLengths; - std::vector<std::string> FilePaths; - uint64_t IndexLogPosition = 0; + eastl::vector<uint32_t> LSNEntries; + eastl::vector<Oid> Keys; + eastl::vector<OplogEntryAddress> AddressMapEntries; + eastl::vector<uint32_t> LatestOpMapEntries; + eastl::vector<IoHash> ChunkMapEntries; + eastl::vector<IoHash> MetaMapEntries; + eastl::vector<uint32_t> FilePathLengths; + eastl::vector<std::string> FilePaths; + uint64_t IndexLogPosition = 0; { IndexLogPosition = m_Storage->LogCount(); @@ -1869,20 +1869,20 @@ ProjectStore::Oplog::ReadIndexSnapshot() return; } - std::vector<uint32_t> LSNEntries(Header.LSNCount); + eastl::vector<uint32_t> LSNEntries(Header.LSNCount); ObjectIndexFile.Read(LSNEntries.data(), LSNEntries.size() * sizeof(uint32_t), Offset); Offset += LSNEntries.size() * sizeof(uint32_t); Offset = RoundUp(Offset, OplogIndexHeader::DataAlignment); size_t LSNOffset = 0; - std::vector<Oid> Keys(Header.KeyCount); + eastl::vector<Oid> Keys(Header.KeyCount); ObjectIndexFile.Read(Keys.data(), Keys.size() * sizeof(Oid), Offset); Offset += Keys.size() * sizeof(Oid); Offset = RoundUp(Offset, OplogIndexHeader::DataAlignment); size_t KeyOffset = 0; { - std::vector<OplogEntryAddress> AddressMapEntries(Header.OpAddressMapCount); + eastl::vector<OplogEntryAddress> AddressMapEntries(Header.OpAddressMapCount); ObjectIndexFile.Read(AddressMapEntries.data(), AddressMapEntries.size() * sizeof(OplogEntryAddress), Offset); Offset += AddressMapEntries.size() * sizeof(OplogEntryAddress); Offset = RoundUp(Offset, OplogIndexHeader::DataAlignment); @@ -1897,7 +1897,7 @@ ProjectStore::Oplog::ReadIndexSnapshot() } } { - std::vector<uint32_t> LatestOpMapEntries(Header.LatestOpMapCount); + eastl::vector<uint32_t> LatestOpMapEntries(Header.LatestOpMapCount); ObjectIndexFile.Read(LatestOpMapEntries.data(), LatestOpMapEntries.size() * sizeof(uint32_t), Offset); Offset += LatestOpMapEntries.size() * sizeof(uint32_t); Offset = RoundUp(Offset, OplogIndexHeader::DataAlignment); @@ -1909,7 +1909,7 @@ ProjectStore::Oplog::ReadIndexSnapshot() } } { - std::vector<IoHash> ChunkMapEntries(Header.ChunkMapCount); + eastl::vector<IoHash> ChunkMapEntries(Header.ChunkMapCount); ObjectIndexFile.Read(ChunkMapEntries.data(), ChunkMapEntries.size() * sizeof(IoHash), Offset); Offset += ChunkMapEntries.size() * sizeof(IoHash); Offset = RoundUp(Offset, OplogIndexHeader::DataAlignment); @@ -1920,7 +1920,7 @@ ProjectStore::Oplog::ReadIndexSnapshot() } } { - std::vector<IoHash> MetaMapEntries(Header.MetaMapCount); + eastl::vector<IoHash> MetaMapEntries(Header.MetaMapCount); ObjectIndexFile.Read(MetaMapEntries.data(), MetaMapEntries.size() * sizeof(IoHash), Offset); Offset += MetaMapEntries.size() * sizeof(IoHash); Offset = RoundUp(Offset, OplogIndexHeader::DataAlignment); @@ -1933,7 +1933,7 @@ ProjectStore::Oplog::ReadIndexSnapshot() { m_FileMap.reserve(Header.FileMapCount); - std::vector<uint32_t> FilePathLengths(Header.FileMapCount * 2); + eastl::vector<uint32_t> FilePathLengths(Header.FileMapCount * 2); ObjectIndexFile.Read(FilePathLengths.data(), FilePathLengths.size() * sizeof(uint32_t), Offset); Offset += FilePathLengths.size() * sizeof(uint32_t); Offset = RoundUp(Offset, OplogIndexHeader::DataAlignment); @@ -2004,7 +2004,7 @@ ProjectStore::Oplog::GetUnusedSpacePercentLocked() const return 0; } - std::vector<OplogEntryAddress> Addresses; + eastl::vector<OplogEntryAddress> Addresses; { Addresses.reserve(m_LatestOpMap.size()); for (auto It : m_LatestOpMap) @@ -2040,7 +2040,7 @@ ProjectStore::Oplog::Compact(RwLock::ExclusiveLockScope&, bool DryRun, bool Reta Stopwatch Timer; - std::vector<uint32_t> LSNs; + eastl::vector<uint32_t> LSNs; LSNs.reserve(m_LatestOpMap.size()); for (auto It : m_LatestOpMap) { @@ -2111,10 +2111,10 @@ ProjectStore::Oplog::IterateChunks(std::span<Oid> ChunkIds, { ZEN_MEMSCOPE(GetProjectstoreTag()); - std::vector<size_t> CidChunkIndexes; - std::vector<IoHash> CidChunkHashes; - std::vector<size_t> FileChunkIndexes; - std::vector<std::filesystem::path> FileChunkPaths; + eastl::vector<size_t> CidChunkIndexes; + eastl::vector<IoHash> CidChunkHashes; + eastl::vector<size_t> FileChunkIndexes; + eastl::vector<std::filesystem::path> FileChunkPaths; { RwLock::SharedLockScope OplogLock(m_OplogLock); for (size_t ChunkIndex = 0; ChunkIndex < ChunkIds.size(); ChunkIndex++) @@ -2288,14 +2288,14 @@ ProjectStore::Oplog::FindChunk(const Oid& ChunkId, uint64_t* OptOutModificationT return {}; } -std::vector<ProjectStore::Oplog::ChunkInfo> +eastl::vector<ProjectStore::Oplog::ChunkInfo> ProjectStore::Oplog::GetAllChunksInfo() { ZEN_MEMSCOPE(GetProjectstoreTag()); // First just capture all the chunk ids - std::vector<ChunkInfo> InfoArray; + eastl::vector<ChunkInfo> InfoArray; { RwLock::SharedLockScope _(m_OplogLock); @@ -2369,7 +2369,7 @@ ProjectStore::Oplog::IterateOplog(std::function<void(CbObjectView)>&& Handler, c template<typename ContainerElement> std::span<ContainerElement> -CreateSpanFromPaging(std::vector<ContainerElement>& Container, const ProjectStore::Oplog::Paging& Paging) +CreateSpanFromPaging(eastl::vector<ContainerElement>& Container, const ProjectStore::Oplog::Paging& Paging) { std::span<ContainerElement> Span(Container); int32_t Size = int32_t(Container.size()); @@ -2388,7 +2388,7 @@ ProjectStore::Oplog::IterateOplogLocked(std::function<void(CbObjectView)>&& Hand return; } - std::vector<OplogEntryAddress> Entries; + eastl::vector<OplogEntryAddress> Entries; Entries.reserve(m_LatestOpMap.size()); for (const auto& Kv : m_LatestOpMap) @@ -2410,7 +2410,7 @@ ProjectStore::Oplog::IterateOplogLocked(std::function<void(CbObjectView)>&& Hand static constexpr uint32_t OplogMetaDataExpectedMagic = 0x6f'74'6d'62; // 'omta'; void -ProjectStore::Oplog::GetAttachmentsLocked(std::vector<IoHash>& OutAttachments, bool StoreMetaDataOnDisk) +ProjectStore::Oplog::GetAttachmentsLocked(eastl::vector<IoHash>& OutAttachments, bool StoreMetaDataOnDisk) { ZEN_MEMSCOPE(GetProjectstoreTag()); ZEN_TRACE_CPU("Store::Oplog::GetAttachmentsLocked"); @@ -2439,9 +2439,9 @@ ProjectStore::Oplog::GetAttachmentsLocked(std::vector<IoHash>& OutAttachments, b } } - std::vector<Oid> Keys; - std::vector<uint32_t> AttachmentCounts; - size_t AttachmentOffset = OutAttachments.size(); + eastl::vector<Oid> Keys; + eastl::vector<uint32_t> AttachmentCounts; + size_t AttachmentOffset = OutAttachments.size(); IterateOplogLocked( [&](CbObjectView Op) { @@ -2513,17 +2513,17 @@ ProjectStore::Oplog::IterateOplogWithKey(std::function<void(uint32_t, const Oid& return; } - std::vector<OplogEntryAddress> SortedEntries; - std::vector<Oid> SortedKeys; - std::vector<uint32_t> SortedLSNs; + eastl::vector<OplogEntryAddress> SortedEntries; + eastl::vector<Oid> SortedKeys; + eastl::vector<uint32_t> SortedLSNs; { const auto TargetEntryCount = m_LatestOpMap.size(); - std::vector<size_t> EntryIndexes; - std::vector<OplogEntryAddress> Entries; - std::vector<Oid> Keys; - std::vector<uint32_t> LSNs; + eastl::vector<size_t> EntryIndexes; + eastl::vector<OplogEntryAddress> Entries; + eastl::vector<Oid> Keys; + eastl::vector<uint32_t> LSNs; Entries.reserve(TargetEntryCount); EntryIndexes.reserve(TargetEntryCount); @@ -2653,8 +2653,8 @@ ProjectStore::Oplog::EnableUpdateCapture() { ZEN_ASSERT(!m_CapturedLSNs); ZEN_ASSERT(!m_CapturedAttachments); - m_CapturedLSNs = std::make_unique<std::vector<uint32_t>>(); - m_CapturedAttachments = std::make_unique<std::vector<IoHash>>(); + m_CapturedLSNs = std::make_unique<eastl::vector<uint32_t>>(); + m_CapturedAttachments = std::make_unique<eastl::vector<IoHash>>(); } else { @@ -2704,7 +2704,7 @@ ProjectStore::Oplog::IterateCapturedLSNsLocked(std::function<bool(const CbObject } } -std::vector<IoHash> +eastl::vector<IoHash> ProjectStore::Oplog::GetCapturedAttachmentsLocked() { ZEN_MEMSCOPE(GetProjectstoreTag()); @@ -2716,7 +2716,7 @@ ProjectStore::Oplog::GetCapturedAttachmentsLocked() return {}; } -std::vector<IoHash> +eastl::vector<IoHash> ProjectStore::Oplog::CheckPendingChunkReferences(std::span<const IoHash> ChunkHashes, const GcClock::Duration& RetainTime) { ZEN_MEMSCOPE(GetProjectstoreTag()); @@ -2735,7 +2735,7 @@ ProjectStore::Oplog::CheckPendingChunkReferences(std::span<const IoHash> ChunkHa } }); - std::vector<IoHash> MissingChunks; + eastl::vector<IoHash> MissingChunks; MissingChunks.reserve(ChunkHashes.size()); for (const IoHash& FileHash : ChunkHashes) { @@ -2769,12 +2769,12 @@ ProjectStore::Oplog::RemovePendingChunkReferences(std::span<const IoHash> ChunkH }); } -std::vector<IoHash> +eastl::vector<IoHash> ProjectStore::Oplog::GetPendingChunkReferencesLocked() { ZEN_MEMSCOPE(GetProjectstoreTag()); - std::vector<IoHash> Result; + eastl::vector<IoHash> Result; Result.reserve(m_PendingPrepOpAttachments.size()); Result.insert(Result.end(), m_PendingPrepOpAttachments.begin(), m_PendingPrepOpAttachments.end()); GcClock::TimePoint Now = GcClock::Now(); @@ -2982,9 +2982,9 @@ ProjectStore::Oplog::AppendNewOplogEntry(CbPackage OpPackage) if (!Attachments.empty()) { - std::vector<IoBuffer> WriteAttachmentBuffers; - std::vector<IoHash> WriteRawHashes; - std::vector<uint64_t> WriteRawSizes; + eastl::vector<IoBuffer> WriteAttachmentBuffers; + eastl::vector<IoHash> WriteRawHashes; + eastl::vector<uint64_t> WriteRawSizes; WriteAttachmentBuffers.reserve(Attachments.size()); WriteRawHashes.reserve(Attachments.size()); @@ -3002,7 +3002,7 @@ ProjectStore::Oplog::AppendNewOplogEntry(CbPackage OpPackage) AttachmentBytes += AttachmentSize; } - std::vector<CidStore::InsertResult> InsertResults = m_CidStore.AddChunks(WriteAttachmentBuffers, WriteRawHashes); + eastl::vector<CidStore::InsertResult> InsertResults = m_CidStore.AddChunks(WriteAttachmentBuffers, WriteRawHashes); for (size_t Index = 0; Index < InsertResults.size(); Index++) { if (InsertResults[Index].New) @@ -3059,7 +3059,7 @@ ProjectStore::Oplog::AppendNewOplogEntry(CbObjectView Core) return EntryId; } -std::vector<uint32_t> +eastl::vector<uint32_t> ProjectStore::Oplog::AppendNewOplogEntries(std::span<CbObjectView> Cores) { ZEN_MEMSCOPE(GetProjectstoreTag()); @@ -3070,12 +3070,12 @@ ProjectStore::Oplog::AppendNewOplogEntries(std::span<CbObjectView> Cores) RefPtr<OplogStorage> Storage = GetStorage(); if (!Storage) { - return std::vector<uint32_t>(Cores.size(), 0xffffffffu); + return eastl::vector<uint32_t>(Cores.size(), 0xffffffffu); } - size_t OpCount = Cores.size(); - std::vector<OplogEntryMapping> Mappings; - std::vector<OplogStorage::AppendOpData> OpDatas; + size_t OpCount = Cores.size(); + eastl::vector<OplogEntryMapping> Mappings; + eastl::vector<OplogStorage::AppendOpData> OpDatas; Mappings.resize(OpCount); OpDatas.resize(OpCount); @@ -3086,9 +3086,9 @@ ProjectStore::Oplog::AppendNewOplogEntries(std::span<CbObjectView> Cores) Mappings[OpIndex] = GetMapping(Core); } - std::vector<OplogEntry> OpEntries = Storage->AppendOps(OpDatas); + eastl::vector<OplogEntry> OpEntries = Storage->AppendOps(OpDatas); - std::vector<uint32_t> EntryIds; + eastl::vector<uint32_t> EntryIds; EntryIds.resize(OpCount); { { @@ -3227,7 +3227,7 @@ ProjectStore::Project::ReadAccessTimes() uint64_t Count = Reader["count"sv].AsUInt64(0); if (Count > 0) { - std::vector<uint64_t> Ticks; + eastl::vector<uint64_t> Ticks; Ticks.reserve(Count); CbArrayView TicksArray = Reader["ticks"sv].AsArrayView(); for (CbFieldView& TickView : TicksArray) @@ -3513,13 +3513,13 @@ ProjectStore::Project::DeleteOplog(std::string_view OplogId) return true; } -std::vector<std::string> +eastl::vector<std::string> ProjectStore::Project::ScanForOplogs() const { ZEN_MEMSCOPE(GetProjectstoreTag()); RwLock::SharedLockScope _(m_ProjectLock); - std::vector<std::string> Oplogs; + eastl::vector<std::string> Oplogs; if (Project::Exists(m_OplogStoragePath)) { DirectoryContent DirContent; @@ -3577,7 +3577,7 @@ ProjectStore::Project::ScrubStorage(ScrubContext& Ctx) { ZEN_MEMSCOPE(GetProjectstoreTag()); // Scrubbing needs to check all existing oplogs - std::vector<std::string> OpLogs = ScanForOplogs(); + eastl::vector<std::string> OpLogs = ScanForOplogs(); for (const std::string& OpLogId : OpLogs) { OpenOplog(OpLogId, /*AllowCompact*/ false, /*VerifyPathOnDisk*/ true); @@ -3617,7 +3617,7 @@ ProjectStore::Project::TotalSize() const ZEN_MEMSCOPE(GetProjectstoreTag()); uint64_t Result = TotalSize(m_OplogStoragePath); { - std::vector<std::string> OpLogs = ScanForOplogs(); + eastl::vector<std::string> OpLogs = ScanForOplogs(); for (const std::string& OpLogId : OpLogs) { std::filesystem::path OplogBasePath = BasePathForOplog(OpLogId); @@ -3658,7 +3658,7 @@ ProjectStore::Project::EnableUpdateCapture() if (m_UpdateCaptureRefCounter == 0) { ZEN_ASSERT(!m_CapturedOplogs); - m_CapturedOplogs = std::make_unique<std::vector<std::string>>(); + m_CapturedOplogs = std::make_unique<eastl::vector<std::string>>(); } else { @@ -3683,7 +3683,7 @@ ProjectStore::Project::DisableUpdateCapture() }); } -std::vector<std::string> +eastl::vector<std::string> ProjectStore::Project::GetCapturedOplogsLocked() { ZEN_MEMSCOPE(GetProjectstoreTag()); @@ -3694,11 +3694,11 @@ ProjectStore::Project::GetCapturedOplogsLocked() return {}; } -std::vector<RwLock::SharedLockScope> +eastl::vector<RwLock::SharedLockScope> ProjectStore::Project::GetGcReferencerLocks() { ZEN_MEMSCOPE(GetProjectstoreTag()); - std::vector<RwLock::SharedLockScope> Locks; + eastl::vector<RwLock::SharedLockScope> Locks; Locks.emplace_back(RwLock::SharedLockScope(m_ProjectLock)); Locks.reserve(1 + m_Oplogs.size()); for (auto& Kv : m_Oplogs) @@ -3907,7 +3907,7 @@ ProjectStore::Flush() ZEN_TRACE_CPU("Store::Flush"); ZEN_INFO("flushing project store at '{}'", m_ProjectBasePath); - std::vector<Ref<Project>> Projects; + eastl::vector<Ref<Project>> Projects; { RwLock::SharedLockScope _(m_ProjectsLock); Projects.reserve(m_Projects.size()); @@ -3949,7 +3949,7 @@ ProjectStore::ScrubStorage(ScrubContext& Ctx) DiscoverProjects(); - std::vector<Ref<Project>> Projects; + eastl::vector<Ref<Project>> Projects; { RwLock::SharedLockScope Lock(m_ProjectsLock); Projects.reserve(m_Projects.size()); @@ -4227,11 +4227,11 @@ ProjectStore::GetProjectFiles(const std::string_view ProjectId, const bool WantsRawSizeField = WantsAllFields || WantedFieldNames.contains("rawsize"); const bool WantsSizeField = WantsAllFields || WantedFieldNames.contains("size"); - std::vector<Oid> Ids; - std::vector<std::string> ServerPaths; - std::vector<std::string> ClientPaths; - std::vector<uint64_t> Sizes; - std::vector<uint64_t> RawSizes; + eastl::vector<Oid> Ids; + eastl::vector<std::string> ServerPaths; + eastl::vector<std::string> ClientPaths; + eastl::vector<uint64_t> Sizes; + eastl::vector<uint64_t> RawSizes; size_t Count = 0; FoundLog->IterateFileMap([&](const Oid& Id, const std::string_view& ServerPath, const std::string_view& ClientPath) { @@ -4390,10 +4390,10 @@ ProjectStore::GetProjectChunkInfos(const std::string_view ProjectId, const bool WantsRawSizeField = WantsAllFields || WantedFieldNames.contains("rawsize"); const bool WantsSizeField = WantsAllFields || WantedFieldNames.contains("size"); - std::vector<Oid> Ids; - std::vector<IoHash> Hashes; - std::vector<uint64_t> RawSizes; - std::vector<uint64_t> Sizes; + eastl::vector<Oid> Ids; + eastl::vector<IoHash> Hashes; + eastl::vector<uint64_t> RawSizes; + eastl::vector<uint64_t> Sizes; size_t Count = 0; size_t EstimatedCount = FoundLog->OplogCount(); @@ -4866,7 +4866,7 @@ ProjectStore::PutChunk(const std::string_view ProjectId, return {HttpResponseCode::BadRequest, fmt::format("Chunk request for invalid payload format for chunk '{}'", Cid)}; } - FoundLog->CaptureAddedAttachments(std::vector<IoHash>{Hash}); + FoundLog->CaptureAddedAttachments(eastl::vector<IoHash>{Hash}); CidStore::InsertResult Result = m_CidStore.AddChunk(Chunk, Hash); return {Result.New ? HttpResponseCode::Created : HttpResponseCode::OK, {}}; } @@ -4949,16 +4949,16 @@ ProjectStore::GetChunks(const std::string_view ProjectId, } Output; }; - std::vector<Request> Requests; - size_t RequestCount = ChunksArray.Num(); + eastl::vector<Request> Requests; + size_t RequestCount = ChunksArray.Num(); if (RequestCount > 0) { Requests.reserve(RequestCount); - std::vector<IoHash> ChunkRawHashes; - std::vector<size_t> ChunkRawHashesRequestIndex; - std::vector<Oid> ChunkIds; - std::vector<size_t> ChunkIdsRequestIndex; - bool DoBatch = RequestCount > 1; + eastl::vector<IoHash> ChunkRawHashes; + eastl::vector<size_t> ChunkRawHashesRequestIndex; + eastl::vector<Oid> ChunkIds; + eastl::vector<size_t> ChunkIdsRequestIndex; + bool DoBatch = RequestCount > 1; if (DoBatch) { ChunkRawHashes.reserve(RequestCount); @@ -5251,7 +5251,7 @@ ProjectStore::WriteOplog(const std::string_view ProjectId, const std::string_vie tsl::robin_set<IoHash, IoHash::Hasher> Attachments; auto HasAttachment = [&ChunkStore](const IoHash& RawHash) { return ChunkStore.ContainsChunk(RawHash); }; - auto OnNeedBlock = [&AttachmentsLock, &Attachments](const IoHash& BlockHash, const std::vector<IoHash>&& ChunkHashes) { + auto OnNeedBlock = [&AttachmentsLock, &Attachments](const IoHash& BlockHash, const eastl::vector<IoHash>&& ChunkHashes) { RwLock::ExclusiveLockScope _(AttachmentsLock); if (BlockHash != IoHash::Zero) { @@ -5366,7 +5366,7 @@ ProjectStore::ReadOplog(const std::string_view ProjectId, /* AllowChunking*/ false, [](CompressedBuffer&&, ChunkBlockDescription&&) {}, [](const IoHash&, TGetAttachmentBufferFunc&&) {}, - [](std::vector<std::pair<IoHash, FetchChunkFunc>>&&) {}, + [](eastl::vector<std::pair<IoHash, FetchChunkFunc>>&&) {}, /* EmbedLooseFiles*/ false); OutResponse = std::move(ContainerResult.ContainerObject); @@ -5530,8 +5530,8 @@ ProjectStore::Rpc(HttpServerRequest& HttpReq, std::span<const CbAttachment> Attachments = Package.GetAttachments(); if (!Attachments.empty()) { - std::vector<IoBuffer> WriteAttachmentBuffers; - std::vector<IoHash> WriteRawHashes; + eastl::vector<IoBuffer> WriteAttachmentBuffers; + eastl::vector<IoHash> WriteRawHashes; WriteAttachmentBuffers.reserve(Attachments.size()); WriteRawHashes.reserve(Attachments.size()); @@ -5568,7 +5568,7 @@ ProjectStore::Rpc(HttpServerRequest& HttpReq, uint64_t TotalBytes = 0; uint64_t TotalFiles = 0; - std::vector<CbObject> NewOps; + eastl::vector<CbObject> NewOps; struct AddedChunk { IoBuffer Buffer; @@ -5865,7 +5865,7 @@ ProjectStore::EnableUpdateCapture() if (m_UpdateCaptureRefCounter == 0) { ZEN_ASSERT(!m_CapturedProjects); - m_CapturedProjects = std::make_unique<std::vector<std::string>>(); + m_CapturedProjects = std::make_unique<eastl::vector<std::string>>(); } else { @@ -5889,7 +5889,7 @@ ProjectStore::DisableUpdateCapture() }); } -std::vector<std::string> +eastl::vector<std::string> ProjectStore::GetCapturedProjectsLocked() { ZEN_MEMSCOPE(GetProjectstoreTag()); @@ -5911,10 +5911,10 @@ ProjectStore::GetGcName(GcCtx&) class ProjectStoreGcStoreCompactor : public GcStoreCompactor { public: - ProjectStoreGcStoreCompactor(ProjectStore& ProjectStore, - const std::filesystem::path& BasePath, - std::vector<std::filesystem::path>&& OplogPathsToRemove, - std::vector<std::filesystem::path>&& ProjectPathsToRemove) + ProjectStoreGcStoreCompactor(ProjectStore& ProjectStore, + const std::filesystem::path& BasePath, + eastl::vector<std::filesystem::path>&& OplogPathsToRemove, + eastl::vector<std::filesystem::path>&& ProjectPathsToRemove) : m_ProjectStore(ProjectStore) , m_BasePath(BasePath) , m_OplogPathsToRemove(std::move(OplogPathsToRemove)) @@ -5982,7 +5982,7 @@ public: for (auto ProjectIt : m_ProjectStore.m_Projects) { Ref<ProjectStore::Project> Project = ProjectIt.second; - std::vector<std::string> OplogsToCompact = Project->GetOplogsToCompact(); + eastl::vector<std::string> OplogsToCompact = Project->GetOplogsToCompact(); CompactOplogCount += OplogsToCompact.size(); for (const std::string& OplogId : OplogsToCompact) { @@ -6040,10 +6040,10 @@ public: virtual std::string GetGcName(GcCtx&) override { return fmt::format("projectstore: '{}'", m_BasePath.string()); } private: - ProjectStore& m_ProjectStore; - std::filesystem::path m_BasePath; - std::vector<std::filesystem::path> m_OplogPathsToRemove; - std::vector<std::filesystem::path> m_ProjectPathsToRemove; + ProjectStore& m_ProjectStore; + std::filesystem::path m_BasePath; + eastl::vector<std::filesystem::path> m_OplogPathsToRemove; + eastl::vector<std::filesystem::path> m_ProjectPathsToRemove; }; GcStoreCompactor* @@ -6068,11 +6068,11 @@ ProjectStore::RemoveExpiredData(GcCtx& Ctx, GcStats& Stats) NiceTimeSpanMs(Timer.GetElapsedTimeMs())); }); - std::vector<std::filesystem::path> OplogPathsToRemove; - std::vector<std::filesystem::path> ProjectPathsToRemove; + eastl::vector<std::filesystem::path> OplogPathsToRemove; + eastl::vector<std::filesystem::path> ProjectPathsToRemove; - std::vector<Ref<Project>> ExpiredProjects; - std::vector<Ref<Project>> Projects; + eastl::vector<Ref<Project>> ExpiredProjects; + eastl::vector<Ref<Project>> Projects; DiscoverProjects(); @@ -6098,9 +6098,9 @@ ProjectStore::RemoveExpiredData(GcCtx& Ctx, GcStats& Stats) break; } - std::vector<std::string> ExpiredOplogs; + eastl::vector<std::string> ExpiredOplogs; - std::vector<std::string> OpLogs = Project->ScanForOplogs(); + eastl::vector<std::string> OpLogs = Project->ScanForOplogs(); for (const std::string& OplogId : OpLogs) { Stats.CheckedCount++; @@ -6199,7 +6199,7 @@ public: Stopwatch Timer; - std::vector<ProjectStore::Oplog*> AddedOplogs; + eastl::vector<ProjectStore::Oplog*> AddedOplogs; const auto _ = MakeGuard([&] { if (!Ctx.Settings.Verbose) @@ -6213,7 +6213,7 @@ public: AddedOplogs.size()); }); - std::vector<std::string> AddedProjects = m_ProjectStore.GetCapturedProjectsLocked(); + eastl::vector<std::string> AddedProjects = m_ProjectStore.GetCapturedProjectsLocked(); for (const std::string& AddedProject : AddedProjects) { if (auto It = m_ProjectStore.m_Projects.find(AddedProject); It != m_ProjectStore.m_Projects.end()) @@ -6230,7 +6230,7 @@ public: { ProjectStore::Project& Project = *ProjectPair.second; - std::vector<std::string> AddedOplogNames(Project.GetCapturedOplogsLocked()); + eastl::vector<std::string> AddedOplogNames(Project.GetCapturedOplogsLocked()); for (const std::string& OplogName : AddedOplogNames) { if (auto It = Project.m_Oplogs.find(OplogName); It != Project.m_Oplogs.end()) @@ -6259,7 +6259,7 @@ public: }); Oplog->GetAttachmentsLocked(m_References, Ctx.Settings.StoreProjectAttachmentMetaData); - if (std::vector<IoHash> PendingChunkReferences = Oplog->GetPendingChunkReferencesLocked(); !PendingChunkReferences.empty()) + if (eastl::vector<IoHash> PendingChunkReferences = Oplog->GetPendingChunkReferencesLocked(); !PendingChunkReferences.empty()) { m_References.insert(m_References.end(), PendingChunkReferences.begin(), PendingChunkReferences.end()); } @@ -6296,8 +6296,8 @@ public: } private: - ProjectStore& m_ProjectStore; - std::vector<IoHash> m_References; + ProjectStore& m_ProjectStore; + eastl::vector<IoHash> m_References; }; class ProjectStoreOplogReferenceChecker : public GcReferenceChecker @@ -6429,9 +6429,9 @@ public: UpdateOp.IterateAttachments([&](CbFieldView Visitor) { m_AddedReferences.emplace_back(Visitor.AsAttachment()); }); return true; }); - std::vector<IoHash> AddedAttachments = Oplog->GetCapturedAttachmentsLocked(); + eastl::vector<IoHash> AddedAttachments = Oplog->GetCapturedAttachmentsLocked(); m_AddedReferences.insert(m_AddedReferences.end(), AddedAttachments.begin(), AddedAttachments.end()); - if (std::vector<IoHash> PendingChunkReferences = Oplog->GetPendingChunkReferencesLocked(); !PendingChunkReferences.empty()) + if (eastl::vector<IoHash> PendingChunkReferences = Oplog->GetPendingChunkReferencesLocked(); !PendingChunkReferences.empty()) { m_AddedReferences.insert(m_AddedReferences.end(), PendingChunkReferences.begin(), PendingChunkReferences.end()); } @@ -6487,12 +6487,12 @@ public: std::string m_OplogId; std::filesystem::path m_OplogBasePath; ProjectStore::Oplog* m_OplogWithUpdateCapture = nullptr; - std::vector<IoHash> m_References; - std::vector<IoHash> m_AddedReferences; + eastl::vector<IoHash> m_References; + eastl::vector<IoHash> m_AddedReferences; GcClock::TimePoint m_OplogAccessTime; }; -std::vector<GcReferenceChecker*> +eastl::vector<GcReferenceChecker*> ProjectStore::CreateReferenceCheckers(GcCtx& Ctx) { ZEN_TRACE_CPU("Store::CreateReferenceCheckers"); @@ -6517,8 +6517,8 @@ ProjectStore::CreateReferenceCheckers(GcCtx& Ctx) DiscoverProjects(); - std::vector<Ref<ProjectStore::Project>> Projects; - std::vector<GcReferenceChecker*> Checkers; + eastl::vector<Ref<ProjectStore::Project>> Projects; + eastl::vector<GcReferenceChecker*> Checkers; Checkers.emplace_back(new ProjectStoreReferenceChecker(*this)); { RwLock::SharedLockScope Lock(m_ProjectsLock); @@ -6534,7 +6534,7 @@ ProjectStore::CreateReferenceCheckers(GcCtx& Ctx) { for (const Ref<ProjectStore::Project>& Project : Projects) { - std::vector<std::string> OpLogs = Project->ScanForOplogs(); + eastl::vector<std::string> OpLogs = Project->ScanForOplogs(); Checkers.reserve(Checkers.size() + OpLogs.size()); for (const std::string& OpLogId : OpLogs) { @@ -6556,18 +6556,18 @@ ProjectStore::CreateReferenceCheckers(GcCtx& Ctx) return Checkers; } -std::vector<RwLock::SharedLockScope> +eastl::vector<RwLock::SharedLockScope> ProjectStore::LockState(GcCtx& Ctx) { ZEN_TRACE_CPU("Store::LockState"); auto Log = [&Ctx]() { return Ctx.Logger; }; - std::vector<RwLock::SharedLockScope> Locks; + eastl::vector<RwLock::SharedLockScope> Locks; Locks.emplace_back(RwLock::SharedLockScope(m_ProjectsLock)); for (auto& ProjectIt : m_Projects) { - std::vector<RwLock::SharedLockScope> ProjectLocks = ProjectIt.second->GetGcReferencerLocks(); + eastl::vector<RwLock::SharedLockScope> ProjectLocks = ProjectIt.second->GetGcReferencerLocks(); for (auto It = std::make_move_iterator(ProjectLocks.begin()); It != std::make_move_iterator(ProjectLocks.end()); It++) { Locks.emplace_back(std::move(*It)); @@ -6675,7 +6675,7 @@ public: std::string m_OplogId; }; -std::vector<GcReferenceValidator*> +eastl::vector<GcReferenceValidator*> ProjectStore::CreateReferenceValidators(GcCtx& Ctx) { if (Ctx.Settings.SkipCidDelete) @@ -6684,20 +6684,20 @@ ProjectStore::CreateReferenceValidators(GcCtx& Ctx) } DiscoverProjects(); - std::vector<std::pair<std::string, std::string>> Oplogs; + eastl::vector<std::pair<std::string, std::string>> Oplogs; { RwLock::SharedLockScope _(m_ProjectsLock); for (auto& ProjectPair : m_Projects) { - ProjectStore::Project& Project = *ProjectPair.second; - std::vector<std::string> OpLogs = Project.ScanForOplogs(); + ProjectStore::Project& Project = *ProjectPair.second; + eastl::vector<std::string> OpLogs = Project.ScanForOplogs(); for (const std::string& OplogName : OpLogs) { Oplogs.push_back({Project.Identifier, OplogName}); } } } - std::vector<GcReferenceValidator*> Validators; + eastl::vector<GcReferenceValidator*> Validators; Validators.reserve(Oplogs.size()); for (const std::pair<std::string, std::string>& Oplog : Oplogs) { @@ -6788,12 +6788,12 @@ namespace testutils { return Package; }; - std::vector<std::pair<Oid, CompressedBuffer>> CreateAttachments( + eastl::vector<std::pair<Oid, CompressedBuffer>> CreateAttachments( const std::span<const size_t>& Sizes, OodleCompressionLevel CompressionLevel = OodleCompressionLevel::VeryFast, uint64_t BlockSize = 0) { - std::vector<std::pair<Oid, CompressedBuffer>> Result; + eastl::vector<std::pair<Oid, CompressedBuffer>> Result; Result.reserve(Sizes.size()); for (size_t Size : Sizes) { @@ -6821,11 +6821,11 @@ namespace testutils { } template<typename ChunkType> - CbObject BuildChunksRequest(bool SkipData, - std::string_view IdName, - const std::vector<ChunkType>& Chunks, - const std::vector<std::pair<size_t, size_t>>& Ranges, - const std::vector<uint64_t>& ModTags) + CbObject BuildChunksRequest(bool SkipData, + std::string_view IdName, + const eastl::vector<ChunkType>& Chunks, + const eastl::vector<std::pair<size_t, size_t>>& Ranges, + const eastl::vector<uint64_t>& ModTags) { CbObjectWriter Request; Request.BeginObject("Request"sv); @@ -6861,18 +6861,18 @@ namespace testutils { return Request.Save(); }; - CbObject BuildChunksRequest(bool SkipData, - const std::vector<Oid>& Chunks, - const std::vector<std::pair<size_t, size_t>>& Ranges, - const std::vector<uint64_t>& ModTags) + CbObject BuildChunksRequest(bool SkipData, + const eastl::vector<Oid>& Chunks, + const eastl::vector<std::pair<size_t, size_t>>& Ranges, + const eastl::vector<uint64_t>& ModTags) { return BuildChunksRequest<Oid>(SkipData, "Oid", Chunks, Ranges, ModTags); } - CbObject BuildChunksRequest(bool SkipData, - const std::vector<IoHash>& Chunks, - const std::vector<std::pair<size_t, size_t>>& Ranges, - const std::vector<uint64_t>& ModTags) + CbObject BuildChunksRequest(bool SkipData, + const eastl::vector<IoHash>& Chunks, + const eastl::vector<std::pair<size_t, size_t>>& Ranges, + const eastl::vector<uint64_t>& ModTags) { return BuildChunksRequest<IoHash>(SkipData, "RawHash", Chunks, Ranges, ModTags); } @@ -7360,8 +7360,8 @@ TEST_CASE("project.store.gc.prep") OplogFile.Open(Project1OplogPath, BasicFile::Mode::kTruncate); } - std::vector<std::pair<Oid, CompressedBuffer>> OpAttachments = CreateAttachments(std::initializer_list<size_t>{7123, 583, 690, 99}); - std::vector<IoHash> OpChunkHashes; + eastl::vector<std::pair<Oid, CompressedBuffer>> OpAttachments = CreateAttachments(std::initializer_list<size_t>{7123, 583, 690, 99}); + eastl::vector<IoHash> OpChunkHashes; for (const auto& Chunk : OpAttachments) { OpChunkHashes.push_back(Chunk.second.DecodeRawHash()); @@ -7569,11 +7569,11 @@ TEST_CASE("project.store.rpc.getchunks") ProjectFile.Open(Project1FilePath, BasicFile::Mode::kTruncate); } - std::vector<Oid> OpIds; + eastl::vector<Oid> OpIds; OpIds.insert(OpIds.end(), {Oid::NewOid(), Oid::NewOid(), Oid::NewOid(), Oid::NewOid()}); - std::unordered_map<Oid, std::vector<std::pair<Oid, CompressedBuffer>>, Oid::Hasher> Attachments; - Oid FilesOpId = Oid::NewOid(); - std::vector<std::pair<Oid, std::filesystem::path>> FilesOpIdAttachments; + std::unordered_map<Oid, eastl::vector<std::pair<Oid, CompressedBuffer>>, Oid::Hasher> Attachments; + Oid FilesOpId = Oid::NewOid(); + eastl::vector<std::pair<Oid, std::filesystem::path>> FilesOpIdAttachments; { Ref<ProjectStore::Project> Project1(ProjectStore.NewProject(BasePath / "proj1"sv, "proj1"sv, @@ -7616,7 +7616,7 @@ TEST_CASE("project.store.rpc.getchunks") CbPackage Response; auto Result = ProjectStore.GetChunks("proj1"sv, "oplog1"sv, - testutils::BuildChunksRequest(/*SkipData*/ false, std::vector<IoHash>{}, {}, {}), + testutils::BuildChunksRequest(/*SkipData*/ false, eastl::vector<IoHash>{}, {}, {}), Response); CHECK_EQ(HttpResponseCode::OK, Result.first); CHECK_EQ(0, Response.GetAttachments().size()); @@ -8151,13 +8151,13 @@ TEST_CASE("project.store.rpc.getchunks") // Multi RawHash Request { - std::vector<CompressedBuffer> AttachmentBuffers{Attachments[OpIds[1]][0].second, - Attachments[OpIds[2]][0].second, - Attachments[OpIds[2]][1].second}; - std::vector<IoHash> AttachmentHashes{AttachmentBuffers[0].DecodeRawHash(), - AttachmentBuffers[1].DecodeRawHash(), - AttachmentBuffers[2].DecodeRawHash()}; - std::vector<uint64_t> ResponseModTags(3, 0); + eastl::vector<CompressedBuffer> AttachmentBuffers{Attachments[OpIds[1]][0].second, + Attachments[OpIds[2]][0].second, + Attachments[OpIds[2]][1].second}; + eastl::vector<IoHash> AttachmentHashes{AttachmentBuffers[0].DecodeRawHash(), + AttachmentBuffers[1].DecodeRawHash(), + AttachmentBuffers[2].DecodeRawHash()}; + eastl::vector<uint64_t> ResponseModTags(3, 0); { // Fresh fetch CbPackage Response; @@ -8274,7 +8274,7 @@ TEST_CASE("project.store.rpc.getchunks") } { // Modtime query with mismatching ModTags - std::vector<uint64_t> MismatchingModTags(ResponseModTags); + eastl::vector<uint64_t> MismatchingModTags(ResponseModTags); for (uint64_t& Tag : MismatchingModTags) { Tag++; @@ -8307,14 +8307,14 @@ TEST_CASE("project.store.rpc.getchunks") } // Multi Id Request { - std::vector<CompressedBuffer> AttachmentBuffers{Attachments[OpIds[1]][0].second, - Attachments[OpIds[2]][0].second, - Attachments[OpIds[2]][1].second}; - std::vector<IoHash> AttachmentHashes{AttachmentBuffers[0].DecodeRawHash(), - AttachmentBuffers[1].DecodeRawHash(), - AttachmentBuffers[2].DecodeRawHash()}; - std::vector<Oid> AttachedIds{Attachments[OpIds[1]][0].first, Attachments[OpIds[2]][0].first, Attachments[OpIds[2]][1].first}; - std::vector<uint64_t> ResponseModTags(3, 0); + eastl::vector<CompressedBuffer> AttachmentBuffers{Attachments[OpIds[1]][0].second, + Attachments[OpIds[2]][0].second, + Attachments[OpIds[2]][1].second}; + eastl::vector<IoHash> AttachmentHashes{AttachmentBuffers[0].DecodeRawHash(), + AttachmentBuffers[1].DecodeRawHash(), + AttachmentBuffers[2].DecodeRawHash()}; + eastl::vector<Oid> AttachedIds{Attachments[OpIds[1]][0].first, Attachments[OpIds[2]][0].first, Attachments[OpIds[2]][1].first}; + eastl::vector<uint64_t> ResponseModTags(3, 0); { // Fresh fetch CbPackage Response; @@ -8431,7 +8431,7 @@ TEST_CASE("project.store.rpc.getchunks") } { // Modtime query with mismatching ModTags - std::vector<uint64_t> MismatchingModTags(ResponseModTags); + eastl::vector<uint64_t> MismatchingModTags(ResponseModTags); for (uint64_t& Tag : MismatchingModTags) { Tag++; @@ -8491,9 +8491,9 @@ TEST_CASE("project.store.partial.read") ProjectFile.Open(Project1FilePath, BasicFile::Mode::kTruncate); } - std::vector<Oid> OpIds; + eastl::vector<Oid> OpIds; OpIds.insert(OpIds.end(), {Oid::NewOid(), Oid::NewOid(), Oid::NewOid(), Oid::NewOid()}); - std::unordered_map<Oid, std::vector<std::pair<Oid, CompressedBuffer>>, Oid::Hasher> Attachments; + std::unordered_map<Oid, eastl::vector<std::pair<Oid, CompressedBuffer>>, Oid::Hasher> Attachments; { Ref<ProjectStore::Project> Project1(ProjectStore.NewProject(BasePath / "proj1"sv, "proj1"sv, @@ -8629,12 +8629,12 @@ TEST_CASE("project.store.block") using namespace std::literals; using namespace testutils; - std::vector<std::size_t> AttachmentSizes({7633, 6825, 5738, 8031, 7225, 566, 3656, 6006, 24, 3466, 1093, 4269, 2257, 3685, 3489, - 7194, 6151, 5482, 6217, 3511, 6738, 5061, 7537, 2759, 1916, 8210, 2235, 4024, 1582, 5251, - 491, 5464, 4607, 8135, 3767, 4045, 4415, 5007, 8876, 6761, 3359, 8526, 4097, 4855, 8225}); + eastl::vector<std::size_t> AttachmentSizes({7633, 6825, 5738, 8031, 7225, 566, 3656, 6006, 24, 3466, 1093, 4269, 2257, 3685, 3489, + 7194, 6151, 5482, 6217, 3511, 6738, 5061, 7537, 2759, 1916, 8210, 2235, 4024, 1582, 5251, + 491, 5464, 4607, 8135, 3767, 4045, 4415, 5007, 8876, 6761, 3359, 8526, 4097, 4855, 8225}); - std::vector<std::pair<Oid, CompressedBuffer>> AttachmentsWithId = CreateAttachments(AttachmentSizes); - std::vector<std::pair<IoHash, FetchChunkFunc>> Chunks; + eastl::vector<std::pair<Oid, CompressedBuffer>> AttachmentsWithId = CreateAttachments(AttachmentSizes); + eastl::vector<std::pair<IoHash, FetchChunkFunc>> Chunks; Chunks.reserve(AttachmentSizes.size()); for (const auto& It : AttachmentsWithId) { |