aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/buildstore/httpbuildstore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-08-06 10:52:49 +0200
committerGitHub Enterprise <[email protected]>2025-08-06 10:52:49 +0200
commit72c4cc46e1bdc147e64b5efca59de7f1560d4788 (patch)
tree487c229f3c50da63ee7433efcd1f2deebf26c23c /src/zenserver/buildstore/httpbuildstore.cpp
parentmore details in parallel work when wait fails/destructor has inconsistent sta... (diff)
downloadzen-72c4cc46e1bdc147e64b5efca59de7f1560d4788.tar.xz
zen-72c4cc46e1bdc147e64b5efca59de7f1560d4788.zip
refactor blobstore (#458)
- Improvement: Refactored build store cache to use existing CidStore implementation instead of implementation specific blob storage - **CAUTION** This will clear any existing cache when updating as the manifest version and storage strategy has changed - Bugfix: BuildStorage cache return "true" for metadata existance for all blobs that had payloads regardless of actual existance for metadata
Diffstat (limited to 'src/zenserver/buildstore/httpbuildstore.cpp')
-rw-r--r--src/zenserver/buildstore/httpbuildstore.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/zenserver/buildstore/httpbuildstore.cpp b/src/zenserver/buildstore/httpbuildstore.cpp
index bcec74ce6..3e1bc4203 100644
--- a/src/zenserver/buildstore/httpbuildstore.cpp
+++ b/src/zenserver/buildstore/httpbuildstore.cpp
@@ -266,7 +266,7 @@ HttpBuildStoreService::PutMetadataRequest(HttpRouterRequest& Req)
BlobsArrayIt++;
MetadataArrayIt++;
}
- m_BuildStore.PutMetadatas(BlobHashes, MetadataPayloads);
+ m_BuildStore.PutMetadatas(BlobHashes, MetadataPayloads, &GetSmallWorkerPool(EWorkloadType::Burst));
return ServerRequest.WriteResponse(HttpResponseCode::OK);
}
@@ -484,7 +484,7 @@ HttpBuildStoreService::BlobsExistsRequest(HttpRouterRequest& Req)
ResponseWriter.BeginArray("metadataExists"sv);
for (const BuildStore::BlobExistsResult& BlobExists : BlobsExists)
{
- ResponseWriter.AddBool(BlobExists.HasBody);
+ ResponseWriter.AddBool(BlobExists.HasMetadata);
if (BlobExists.HasMetadata)
{
m_BuildStoreStats.BlobExistsMetaHitCount++;
@@ -529,22 +529,11 @@ HttpBuildStoreService::HandleStatsRequest(HttpServerRequest& Request)
BuildStore::StorageStats StorageStats = m_BuildStore.GetStorageStats();
Cbo << "count" << StorageStats.EntryCount;
- Cbo << "bytes" << StorageStats.LargeBlobBytes + StorageStats.SmallBlobBytes + StorageStats.MetadataByteCount;
+ Cbo << "bytes" << StorageStats.BlobBytes + StorageStats.MetadataByteCount;
Cbo.BeginObject("blobs");
{
- Cbo << "count" << (StorageStats.LargeBlobCount + StorageStats.SmallBlobCount);
- Cbo << "bytes" << (StorageStats.LargeBlobBytes + StorageStats.SmallBlobBytes);
- Cbo.BeginObject("large");
- {
- Cbo << "count" << StorageStats.LargeBlobCount;
- Cbo << "bytes" << StorageStats.LargeBlobBytes;
- }
- Cbo.EndObject(); // large
- Cbo.BeginObject("small");
- {
- Cbo << "count" << StorageStats.SmallBlobCount;
- Cbo << "bytes" << StorageStats.SmallBlobBytes;
- }
+ Cbo << "count" << StorageStats.BlobCount;
+ Cbo << "bytes" << StorageStats.BlobBytes;
Cbo.EndObject(); // small
}
Cbo.EndObject(); // blobs