diff options
| author | Joe Kirchoff <[email protected]> | 2022-04-19 13:20:34 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-04-19 13:20:34 -0700 |
| commit | db4ebf0f691c37cad2153756a8e7bd22db86cbd6 (patch) | |
| tree | 627da40ff108bee11de2ddc69909e2c27be06f86 /zenserver/upstream | |
| parent | Merge pull request #76 from EpicGames/ci_updates (diff) | |
| download | zen-1.0.0.3.tar.xz zen-1.0.0.3.zip | |
Compute tweaks (#78)v1.0.0.3
Remove force upload, not necessary.
Add a few more timepoints
Diffstat (limited to 'zenserver/upstream')
| -rw-r--r-- | zenserver/upstream/hordecompute.cpp | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/zenserver/upstream/hordecompute.cpp b/zenserver/upstream/hordecompute.cpp index ca78d9160..dbf86cc13 100644 --- a/zenserver/upstream/hordecompute.cpp +++ b/zenserver/upstream/hordecompute.cpp @@ -278,9 +278,7 @@ namespace detail { } } - [[nodiscard]] CloudCacheResult BatchPutBlobsIfMissing(CloudCacheSession& Session, - const std::map<IoHash, IoBuffer>& Blobs, - const bool Force = false) + [[nodiscard]] CloudCacheResult BatchPutBlobsIfMissing(CloudCacheSession& Session, const std::map<IoHash, IoBuffer>& Blobs) { if (Blobs.size() == 0) { @@ -309,11 +307,6 @@ namespace detail { .Reason = !ExistsResult.Reason.empty() ? std::move(ExistsResult.Reason) : "Failed to check if blobs exist"}; } - if (Force) - { - ExistsResult.Needs = Keys; - } - for (const auto& Hash : ExistsResult.Needs) { CloudCacheResult Result = Session.PutBlob(Hash, Blobs.at(Hash)); @@ -332,9 +325,7 @@ namespace detail { return {.Bytes = Bytes, .ElapsedSeconds = ElapsedSeconds, .Success = true}; } - [[nodiscard]] CloudCacheResult BatchPutObjectsIfMissing(CloudCacheSession& Session, - const std::map<IoHash, CbObject>& Objects, - const bool Force = false) + [[nodiscard]] CloudCacheResult BatchPutObjectsIfMissing(CloudCacheSession& Session, const std::map<IoHash, CbObject>& Objects) { if (Objects.size() == 0) { @@ -363,11 +354,6 @@ namespace detail { .Reason = !ExistsResult.Reason.empty() ? std::move(ExistsResult.Reason) : "Failed to check if objects exist"}; } - if (Force) - { - ExistsResult.Needs = Keys; - } - for (const auto& Hash : ExistsResult.Needs) { CloudCacheResult Result = Session.PutObject(Hash, Objects.at(Hash).GetBuffer().AsIoBuffer()); @@ -539,18 +525,18 @@ namespace detail { continue; } + Timepoints["zen-complete-queue-added"] = DateTime::NowTicks(); ThreadPool.ScheduleWork([this, ApplyType, ResultHash = Status["r"sv].AsHash(), Timepoints = std::move(Timepoints), TaskId = std::move(TaskId), WorkerId = std::move(WorkerId), - ActionId = std::move(ActionId)]() { - GetUpstreamApplyResult Result = ProcessTaskStatus(ApplyType, ResultHash); - for (auto& Timepoint : Timepoints) - { - Result.Timepoints.emplace(Timepoint); - } + ActionId = std::move(ActionId)]() mutable { + Timepoints["zen-complete-queue-dispatched"] = DateTime::NowTicks(); + GetUpstreamApplyResult Result = ProcessTaskStatus(ApplyType, ResultHash); + Timepoints["zen-complete-queue-complete"] = DateTime::NowTicks(); + Result.Timepoints.merge(Timepoints); Log().debug("Task Processed {} Files={} Attachments={} ExitCode={}", TaskId, |