aboutsummaryrefslogtreecommitdiff
path: root/src/zenremotestore
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenremotestore')
-rw-r--r--src/zenremotestore/chunking/chunkedcontent.cpp4
-rw-r--r--src/zenremotestore/include/zenremotestore/builds/buildstorageoperations.h6
-rw-r--r--src/zenremotestore/include/zenremotestore/chunking/chunkblock.h2
-rw-r--r--src/zenremotestore/include/zenremotestore/chunking/chunkedcontent.h2
-rw-r--r--src/zenremotestore/include/zenremotestore/projectstore/remoteprojectstore.h20
5 files changed, 16 insertions, 18 deletions
diff --git a/src/zenremotestore/chunking/chunkedcontent.cpp b/src/zenremotestore/chunking/chunkedcontent.cpp
index 62c927508..c09ab9d3a 100644
--- a/src/zenremotestore/chunking/chunkedcontent.cpp
+++ b/src/zenremotestore/chunking/chunkedcontent.cpp
@@ -166,7 +166,6 @@ namespace {
if (Chunked.Info.ChunkSequence.empty())
{
AddChunkSequence(Stats, OutChunkedContent.ChunkedContent, ChunkHashToChunkIndex, Chunked.Info.RawHash, RawSize);
- Stats.UniqueSequencesFound++;
}
else
{
@@ -186,7 +185,6 @@ namespace {
Chunked.Info.ChunkHashes,
ChunkSizes);
}
- Stats.UniqueSequencesFound++;
}
});
Stats.FilesChunked++;
@@ -253,7 +251,7 @@ FolderContent::operator==(const FolderContent& Rhs) const
if ((Platform == Rhs.Platform) && (RawSizes == Rhs.RawSizes) && (Attributes == Rhs.Attributes) &&
(ModificationTicks == Rhs.ModificationTicks) && (Paths.size() == Rhs.Paths.size()))
{
- size_t PathCount = 0;
+ size_t PathCount = Paths.size();
for (size_t PathIndex = 0; PathIndex < PathCount; PathIndex++)
{
if (Paths[PathIndex].generic_string() != Rhs.Paths[PathIndex].generic_string())
diff --git a/src/zenremotestore/include/zenremotestore/builds/buildstorageoperations.h b/src/zenremotestore/include/zenremotestore/builds/buildstorageoperations.h
index 875b8593b..0d2eded58 100644
--- a/src/zenremotestore/include/zenremotestore/builds/buildstorageoperations.h
+++ b/src/zenremotestore/include/zenremotestore/builds/buildstorageoperations.h
@@ -161,7 +161,7 @@ public:
DownloadStatistics m_DownloadStats;
WriteChunkStatistics m_WriteChunkStats;
RebuildFolderStateStatistics m_RebuildFolderStateStats;
- std::atomic<uint64_t> m_WrittenChunkByteCount;
+ std::atomic<uint64_t> m_WrittenChunkByteCount = 0;
private:
struct BlockWriteOps
@@ -186,7 +186,7 @@ private:
uint32_t ScavengedContentIndex = (uint32_t)-1;
uint32_t ScavengedPathIndex = (uint32_t)-1;
uint32_t RemoteSequenceIndex = (uint32_t)-1;
- uint64_t RawSize = (uint32_t)-1;
+ uint64_t RawSize = (uint64_t)-1;
};
struct CopyChunkData
@@ -362,7 +362,7 @@ private:
const std::filesystem::path m_TempDownloadFolderPath;
const std::filesystem::path m_TempBlockFolderPath;
- std::atomic<uint64_t> m_ValidatedChunkByteCount;
+ std::atomic<uint64_t> m_ValidatedChunkByteCount = 0;
};
struct FindBlocksStatistics
diff --git a/src/zenremotestore/include/zenremotestore/chunking/chunkblock.h b/src/zenremotestore/include/zenremotestore/chunking/chunkblock.h
index 7aae1442e..20b6fd371 100644
--- a/src/zenremotestore/include/zenremotestore/chunking/chunkblock.h
+++ b/src/zenremotestore/include/zenremotestore/chunking/chunkblock.h
@@ -24,7 +24,7 @@ struct ThinChunkBlockDescription
struct ChunkBlockDescription : public ThinChunkBlockDescription
{
- uint64_t HeaderSize;
+ uint64_t HeaderSize = 0;
std::vector<uint32_t> ChunkRawLengths;
std::vector<uint32_t> ChunkCompressedLengths;
};
diff --git a/src/zenremotestore/include/zenremotestore/chunking/chunkedcontent.h b/src/zenremotestore/include/zenremotestore/chunking/chunkedcontent.h
index d402bd3f0..f44381e42 100644
--- a/src/zenremotestore/include/zenremotestore/chunking/chunkedcontent.h
+++ b/src/zenremotestore/include/zenremotestore/chunking/chunkedcontent.h
@@ -231,7 +231,7 @@ GetSequenceIndexForRawHash(const ChunkedContentLookup& Lookup, const IoHash& Raw
inline uint32_t
GetChunkIndexForRawHash(const ChunkedContentLookup& Lookup, const IoHash& RawHash)
{
- return Lookup.RawHashToSequenceIndex.at(RawHash);
+ return Lookup.ChunkHashToChunkIndex.at(RawHash);
}
inline uint32_t
diff --git a/src/zenremotestore/include/zenremotestore/projectstore/remoteprojectstore.h b/src/zenremotestore/include/zenremotestore/projectstore/remoteprojectstore.h
index 2cf10c664..42786d0f2 100644
--- a/src/zenremotestore/include/zenremotestore/projectstore/remoteprojectstore.h
+++ b/src/zenremotestore/include/zenremotestore/projectstore/remoteprojectstore.h
@@ -92,22 +92,22 @@ public:
struct RemoteStoreInfo
{
- bool CreateBlocks;
- bool UseTempBlockFiles;
- bool AllowChunking;
+ bool CreateBlocks = false;
+ bool UseTempBlockFiles = false;
+ bool AllowChunking = false;
std::string ContainerName;
std::string Description;
};
struct Stats
{
- std::uint64_t m_SentBytes;
- std::uint64_t m_ReceivedBytes;
- std::uint64_t m_RequestTimeNS;
- std::uint64_t m_RequestCount;
- std::uint64_t m_PeakSentBytes;
- std::uint64_t m_PeakReceivedBytes;
- std::uint64_t m_PeakBytesPerSec;
+ std::uint64_t m_SentBytes = 0;
+ std::uint64_t m_ReceivedBytes = 0;
+ std::uint64_t m_RequestTimeNS = 0;
+ std::uint64_t m_RequestCount = 0;
+ std::uint64_t m_PeakSentBytes = 0;
+ std::uint64_t m_PeakReceivedBytes = 0;
+ std::uint64_t m_PeakBytesPerSec = 0;
};
struct ExtendedStats