aboutsummaryrefslogtreecommitdiff
path: root/zenserver/compute/apply.cpp
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2021-09-06 13:36:23 +0200
committerPer Larsson <[email protected]>2021-09-06 13:36:23 +0200
commit482d8087c8522248f85c00233ab06a7ef6a34c55 (patch)
tree754f7fb287cd6695e7ac2c765fe394ae79ae7fce /zenserver/compute/apply.cpp
parentChanged Jupiter endpoint to dev environment. (diff)
parentMerge branch 'main' of https://github.com/EpicGames/zen (diff)
downloadzen-482d8087c8522248f85c00233ab06a7ef6a34c55.tar.xz
zen-482d8087c8522248f85c00233ab06a7ef6a34c55.zip
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'zenserver/compute/apply.cpp')
-rw-r--r--zenserver/compute/apply.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/zenserver/compute/apply.cpp b/zenserver/compute/apply.cpp
index ff90be9ec..939ac3362 100644
--- a/zenserver/compute/apply.cpp
+++ b/zenserver/compute/apply.cpp
@@ -428,17 +428,19 @@ HttpFunctionService::HttpFunctionService(CasStore& Store, CidStore& InCidStore,
{
ZEN_ASSERT(Attachment.IsBinary());
- const IoHash DataHash = Attachment.GetHash();
- SharedBuffer DataView = Attachment.AsBinary();
+ const IoHash DataHash = Attachment.GetHash();
+ CompressedBuffer DataView = Attachment.AsCompressedBinary();
- TotalAttachmentBytes += DataView.GetSize();
+ TotalAttachmentBytes += DataView.GetCompressedSize();
++AttachmentCount;
- CasStore::InsertResult InsertResult = m_CasStore.InsertChunk(DataView.AsIoBuffer(), DataHash);
+ IoBuffer Payload = DataView.GetCompressed().Flatten().AsIoBuffer();
+
+ CasStore::InsertResult InsertResult = m_CasStore.InsertChunk(Payload, DataHash);
if (InsertResult.New)
{
- TotalNewBytes += DataView.GetSize();
+ TotalNewBytes += Payload.Size();
++NewAttachmentCount;
}
}