aboutsummaryrefslogtreecommitdiff
path: root/zenserver/upstream/hordecompute.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-05-06 16:42:27 +0200
committerDan Engelbrecht <[email protected]>2022-05-11 16:13:36 +0200
commit33fa76a35a96cad1865854068e60c1ca0b53864e (patch)
treeeaf79c48e277286270ac3862ec6897b4bfab4fba /zenserver/upstream/hordecompute.cpp
parentMerge pull request #92 from EpicGames/de/bucket-standalone-temp-file-cleanup (diff)
downloadzen-33fa76a35a96cad1865854068e60c1ca0b53864e.tar.xz
zen-33fa76a35a96cad1865854068e60c1ca0b53864e.zip
parameterize namespace for upstream (first hack)
Diffstat (limited to 'zenserver/upstream/hordecompute.cpp')
-rw-r--r--zenserver/upstream/hordecompute.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/zenserver/upstream/hordecompute.cpp b/zenserver/upstream/hordecompute.cpp
index dbf86cc13..4d502a193 100644
--- a/zenserver/upstream/hordecompute.cpp
+++ b/zenserver/upstream/hordecompute.cpp
@@ -198,7 +198,8 @@ namespace detail {
}
{
- PutRefResult RefResult = StorageSession.PutRef("requests"sv,
+ PutRefResult RefResult = StorageSession.PutRef(StorageSession.Client().BlobStoreNamespace(),
+ "requests"sv,
UpstreamData.TaskId,
UpstreamData.Objects[UpstreamData.TaskId].GetBuffer().AsIoBuffer(),
ZenContentType::kCbObject);
@@ -292,7 +293,7 @@ namespace detail {
std::set<IoHash> Keys;
std::transform(Blobs.begin(), Blobs.end(), std::inserter(Keys, Keys.end()), [](const auto& It) { return It.first; });
- CloudCacheExistsResult ExistsResult = Session.BlobExists(Keys);
+ CloudCacheExistsResult ExistsResult = Session.BlobExists(Session.Client().BlobStoreNamespace(), Keys);
Log().debug("Queried {} missing blobs Need={} Duration={}s Result={}",
Keys.size(),
ExistsResult.Needs.size(),
@@ -309,7 +310,7 @@ namespace detail {
for (const auto& Hash : ExistsResult.Needs)
{
- CloudCacheResult Result = Session.PutBlob(Hash, Blobs.at(Hash));
+ CloudCacheResult Result = Session.PutBlob(Session.Client().BlobStoreNamespace(), Hash, Blobs.at(Hash));
Log().debug("Put blob {} Bytes={} Duration={}s Result={}", Hash, Result.Bytes, Result.ElapsedSeconds, Result.Success);
Bytes += Result.Bytes;
ElapsedSeconds += Result.ElapsedSeconds;
@@ -339,7 +340,7 @@ namespace detail {
std::set<IoHash> Keys;
std::transform(Objects.begin(), Objects.end(), std::inserter(Keys, Keys.end()), [](const auto& It) { return It.first; });
- CloudCacheExistsResult ExistsResult = Session.ObjectExists(Keys);
+ CloudCacheExistsResult ExistsResult = Session.ObjectExists(Session.Client().BlobStoreNamespace(), Keys);
Log().debug("Queried {} missing objects Need={} Duration={}s Result={}",
Keys.size(),
ExistsResult.Needs.size(),
@@ -356,7 +357,8 @@ namespace detail {
for (const auto& Hash : ExistsResult.Needs)
{
- CloudCacheResult Result = Session.PutObject(Hash, Objects.at(Hash).GetBuffer().AsIoBuffer());
+ CloudCacheResult Result =
+ Session.PutObject(Session.Client().BlobStoreNamespace(), Hash, Objects.at(Hash).GetBuffer().AsIoBuffer());
Log().debug("Put object {} Bytes={} Duration={}s Result={}", Hash, Result.Bytes, Result.ElapsedSeconds, Result.Success);
Bytes += Result.Bytes;
ElapsedSeconds += Result.ElapsedSeconds;
@@ -691,7 +693,8 @@ namespace detail {
std::map<IoHash, IoBuffer> BinaryData;
{
- CloudCacheResult ObjectRefResult = Session.GetRef("responses"sv, ResultHash, ZenContentType::kCbObject);
+ CloudCacheResult ObjectRefResult =
+ Session.GetRef(Session.Client().BlobStoreNamespace(), "responses"sv, ResultHash, ZenContentType::kCbObject);
Log().debug("Get ref {} Bytes={} Duration={}s Result={}",
ResultHash,
ObjectRefResult.Bytes,
@@ -718,7 +721,8 @@ namespace detail {
std::set<IoHash> NeededData;
if (OutputHash != IoHash::Zero)
{
- GetObjectReferencesResult ObjectReferenceResult = Session.GetObjectReferences(OutputHash);
+ GetObjectReferencesResult ObjectReferenceResult =
+ Session.GetObjectReferences(Session.Client().BlobStoreNamespace(), OutputHash);
Log().debug("Get object references {} References={} Bytes={} Duration={}s Result={}",
ResultHash,
ObjectReferenceResult.References.size(),
@@ -748,7 +752,7 @@ namespace detail {
{
continue;
}
- CloudCacheResult BlobResult = Session.GetBlob(Hash);
+ CloudCacheResult BlobResult = Session.GetBlob(Session.Client().BlobStoreNamespace(), Hash);
Log().debug("Get blob {} Bytes={} Duration={}s Result={}",
Hash,
BlobResult.Bytes,