aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2026-03-15 19:28:06 +0100
committerDan Engelbrecht <[email protected]>2026-03-15 19:28:06 +0100
commitbf2bd355525e153b7c451a66463a7a2bcf6cc32a (patch)
tree6d7fa91e5f7e30596d997aecf90fbc8dda905d94
parenterror reporting (diff)
downloadzen-bf2bd355525e153b7c451a66463a7a2bcf6cc32a.tar.xz
zen-bf2bd355525e153b7c451a66463a7a2bcf6cc32a.zip
cleanup and typos
-rw-r--r--src/zenremotestore/projectstore/remoteprojectstore.cpp26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/zenremotestore/projectstore/remoteprojectstore.cpp b/src/zenremotestore/projectstore/remoteprojectstore.cpp
index 75fe6e668..f0e55b2b1 100644
--- a/src/zenremotestore/projectstore/remoteprojectstore.cpp
+++ b/src/zenremotestore/projectstore/remoteprojectstore.cpp
@@ -2042,7 +2042,7 @@ namespace remotestore_impl {
if (AttachmentResult.ErrorCode)
{
ReportMessage(Context.OptionalJobContext,
- fmt::format("Failed to download large attachment {}: '{}', error code : {}",
+ fmt::format("Failed to download large attachment {}: '{}', error code: {}",
RawHash,
AttachmentResult.Reason,
AttachmentResult.ErrorCode));
@@ -2144,14 +2144,7 @@ namespace remotestore_impl {
Stopwatch Timer;
ChunkBlockDescription Block;
CompressedBuffer CompressedBlock = GenerateChunkBlock(std::move(Chunks), Block);
- IoHash BlockHash = CompressedBlock.DecodeRawHash();
- ZEN_UNUSED(BlockHash);
- {
- // We can share the lock as we are not resizing the vector and only touch BlockHash at our own index
- RwLock::SharedLockScope __(SectionsLock);
- Blocks[BlockIndex] = Block;
- }
- uint64_t BlockSize = CompressedBlock.GetCompressedSize();
+ uint64_t BlockSize = CompressedBlock.GetCompressedSize();
AsyncOnBlock(std::move(CompressedBlock), std::move(Block));
ZEN_INFO("Generated block with {} attachments in {} ({})",
ChunkCount,
@@ -2765,11 +2758,11 @@ BuildContainer(CidStore& ChunkStore,
else
{
remotestore_impl::ReportMessage(OptionalContext,
- fmt::format("Resolving {} attachments from {} ops ({} ({:1f}%) found in existing blocks)",
+ fmt::format("Resolving {} attachments from {} ops ({} ({:.1f}%) found in existing blocks)",
UploadAttachments.size(),
TotalOpCount,
ReusedAttachmentCount,
- (1000.f * ReusedAttachmentCount) / UploadAttachments.size()));
+ (100.f * ReusedAttachmentCount) / UploadAttachments.size()));
ResolveAttachments(ChunkStore,
WorkerPool,
@@ -3613,7 +3606,7 @@ ParseOplogContainer(
{
remotestore_impl::ReportMessage(
OptionalContext,
- fmt::format("Failed to save oplog container: '{}' ('{}')", "Section has unexpected data type", ToString(ValidateResult)));
+ fmt::format("Failed to read oplog container: '{}' ('{}')", "Section has unexpected data type", ToString(ValidateResult)));
return RemoteProjectStore::Result{gsl::narrow<int>(HttpResponseCode::BadRequest),
Timer.GetElapsedTimeMs() / 1000.0,
"Section has unexpected data type",
@@ -4394,10 +4387,9 @@ LoadOplog(LoadOplogContext&& Context)
Info.MissingAttachmentCount.fetch_add(1);
if (!Context.IgnoreMissingAttachments)
{
- RemoteResult.SetError(
- gsl::narrow<int>(HttpResponseCode::NotFound),
- "Missing chunk",
- Message;
+ RemoteResult.SetError(gsl::narrow<int>(HttpResponseCode::NotFound),
+ "Missing chunk",
+ Message);
}
return;
}
@@ -4707,7 +4699,7 @@ namespace projectstore_testutils {
// CbFieldType::Hash set to IoHash::Zero. CbFieldView::AsHash() returns Zero for a
// plain Hash field whose stored value is zero, so RewriteOp still enters the rewrite
// path (DataHash == Zero) and calls RewriteCbObject, which then finds the pre-existing
- // "data" field — triggering the return-true branch at line 1858.
+ // "data" field, triggering the return-true branch at line 1858.
static CbPackage CreateFilesOplogPackageWithZeroDataHash(const Oid& Id,
const std::filesystem::path ProjectRootDir,
const std::span<const std::pair<Oid, std::filesystem::path>>& Attachments)