Commit Graph

35 Commits

Author SHA1 Message Date
Devin Doucette
a077feffbd DDC: Reworked ICacheStore to allow partial records, filtering of payloads, and loading parts of payloads
- ICacheStore::Put() has updated documentation to reflect the requirements of partial records.
- ICacheStore::Get() now takes a FCacheRecordPolicy, which is implicitly constructible from ECachePolicy, and allows setting the policy by payload.
- ICacheStore::GetPayload() is replaced by ICacheStore::GetChunks(), which allows loading parts of payloads.
- ICacheStore::CancelAll() is moved to ICache::CancelAll() because the cache can track requests at the top level and cancel them without exposing cancellation on individual cache stores.
- ECachePolicy::SkipLocalCopy has been removed because it is difficult to reason about.
- ECachePolicy::SkipData flags now have a documented meaning for put requests, to hint that record existence implies payload existence.
- The filesystem and memory cache stores have been updated to support partial records, filtering of payloads, and loading parts of payloads.
- Requesting part of a payload will decompress the entire payload for now, until compressed buffers expose a way to decompress only part.
- Fixed a bug in FTexturePlatformData::AreDerivedMipsAvailable() that caused it to return false for structured cache keys.

#rb Zousar.Shaker
#rnx
#preflight 615e03241ed62f0001b95454

#ROBOMERGE-OWNER: Devin.Doucette
#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 17748550 in //UE5/Release-5.0/... via CL 17748555
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v879-17706426)
#ROBOMERGE-CONFLICT from-shelf
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17748602 by Devin Doucette in ue5-release-engine-test branch]
2021-10-07 09:11:32 -04:00
devin doucette
e5afff71d4 DDC: Switched to FLazyEvent to reduce build execution overhead
#rb Zousar.Shaker
#rnx
#preflight 614d5c567684f50001a07c40

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 17629838 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17629859 by devin doucette in ue5-release-engine-test branch]
2021-09-27 09:36:23 -04:00
devin doucette
9c01e2fc04 DDC: Moved FPayloadId into a dedicated header
#rb Zousar.Shaker
#rnx

#ROBOMERGE-SOURCE: CL 17426140 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17426194 by devin doucette in ue5-release-engine-test branch]
2021-09-03 16:30:53 -04:00
devin doucette
c67fcf1702 DDC: Split DerivedDataRequest.h and rename DerivedDataBuildPolicy.h
#rb none
#rnx

#ROBOMERGE-SOURCE: CL 17086960 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17086977 by devin doucette in ue5-release-engine-test branch]
2021-08-06 15:50:00 -04:00
devin doucette
bd60f3ef1b DDC: Removed ICacheFactory in favor of exported functions
FCacheBucket is now always exposed as FAnsiStringView.

#rb Zousar.Shaker
#rnx

#ROBOMERGE-SOURCE: CL 17084521 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17084549 by devin doucette in ue5-release-engine-test branch]
2021-08-06 12:53:08 -04:00
devin doucette
f9a760f21f DDC: Rename FRequestGroup to FRequestOwner and export its constructor
#rb Zousar.Shaker
#rnx

#ROBOMERGE-SOURCE: CL 17074555 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17074567 by devin doucette in ue5-release-engine-test branch]
2021-08-05 15:46:22 -04:00
devin doucette
bfda02d384 DDC: Replaced FRequest with FRequestGroup to handle nested and chained requests more robustly
Any function that may create a request now has a IRequestOwner& parameter, and uses the Begin and End functions on the owner to manage the lifetime of any requests that it creates, as well as using End to invoke the completion callback for any request which has one.

The new FRequestBarrier may be used to block a group from being considered complete in a scope where more requests may be added to it.

#rb Matt.Peters
#rnx
#preflight 6109b5c403d303000144cce5
#preflight 610acf7103d30300016fda94

#ROBOMERGE-SOURCE: CL 17060470 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v850-17047176)

[CL 17060649 by devin doucette in ue5-release-engine-test branch]
2021-08-04 18:08:50 -04:00
danny couture
3cc87f486a Fix double Jupiter download caused by improper usage of async put underneath each backend in hierarchy
- Remove one copy of the data in the AsyncPut task when used in conjonction with an Inflight cache
  - Make sure each async put in the hierarchical backend can fullfill request from it's Inflight cache
  - Make sure to hit the asyncput backends for exists, trytoprefetch and get queries to avoid repetitive miss while the put is still in flight
  - Remove the code that tried to delete cache miss as it caused many deletes and redownload of the same asset, that duty is fulfilled by the corruption wrapper anyway
  - Fix race condition when mounting and unmounting Pak files or other modifications applied to the hierarchical backend

#rnx
#rb Devin.Doucette, Francis.Hurteau
#preflight 61009a8d1e63730001d339a2

#ROBOMERGE-SOURCE: CL 16977632 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16977643 by danny couture in ue5-release-engine-test branch]
2021-07-27 21:20:40 -04:00
devin doucette
bed1f486f8 DDC: Added EPutStatus::Skipped to avoid slow retry when simulating cache misses
#rb Zousar.Shaker
#preflight 60f12443a34bf50001654df1

#ROBOMERGE-SOURCE: CL 16883247 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16883252 by devin doucette in ue5-release-engine-test branch]
2021-07-19 10:12:20 -04:00
Devin Doucette
3f40f504cf DDC: Changed Put to take a const array of cache records now that records are copyable
#rb Zousar.Shaker
#rnx

[CL 16184736 by Devin Doucette in ue5-main branch]
2021-05-03 12:05:18 -04:00
Devin Doucette
e42bbbedab DDC: Implement ICacheStore on FDerivedDataBackendInterface
This allows the new cache to be implemented more efficiently using the old cache backends because functionality like the corruption wrapper and key length limiter can be bypassed and the individual backends can store cache records in whatever way is most efficient for them.

The hierarchical backend may request payloads when they are not required due to incomplete tracking of backend state, and GetPayload will never fill other backends due to the inefficiency of the existing backend framework.

The filesystem backend does not cache any state in memory, which makes requests for individual payloads less efficient than if it cached a mapping of cache payload key to raw hash after the first request for a cache key.

The HTTP, S3, and pak file backends are not implemented for the new interface.

The backends do not implement ICacheStore::CancelAll() because the existing backend framework provides WaitForQuiescence to wait for completion of async requests, and the implementation of ICacheStore by those backends works with that mechanism.

The non-leaf backends (hierarchical, async put, etc.) do not update stats from the ICacheStore functions.

#rb Zousar.Shaker
#rnx
#preflight 60899f35d324590001b47517

[CL 16148296 by Devin Doucette in ue5-main branch]
2021-04-28 16:22:18 -04:00
Zousar Shaker
a7de618da5 Avoid stalling during shutdown due to queued async PUTs to non-local backends in DDC.
#rb devin.doucette

[CL 16016623 by Zousar Shaker in ue5-main branch]
2021-04-14 23:37:27 -04:00
Marc Audy
0cbbc781ca Merge UE5/Release-Engine-Staging @ 15740152 to UE5/Main
This represents UE4/Main @ 15709114

[CL 15740605 by Marc Audy in ue5-main branch]
2021-03-18 15:20:03 -04:00
Devin Doucette
6394ccc1cd DDC: Added TryToPrefetch to check multiple keys for existence and prefetch the data into a fast cache backend
#rb Zousar.Shaker

[CL 15422719 by Devin Doucette in ue5-main branch]
2021-02-16 17:24:48 -04:00
danny couture
0790ec6eb0 Create a separate thread pool for the I/O portion of DDC requests to avoid clogging the workers with long I/O waits
Add queued work priority support to auto delete async tasks and schedule DDC Puts as Low priority
ThreadPool threads are now honoring the names they've been given on creation
Move the I/O only async DDC Get into the DDC ThreadPool with higher priority (Normal) than DCC Puts

#rb Devin.Doucette

[CL 15177897 by danny couture in ue5-main branch]
2021-01-25 10:55:26 -04:00
Devin Doucette
9010b3e1a5 DDC: Return a status from PutCachedData
The async put backend now uses this new status to avoid calling CachedDataProbablyExists after every put, which has a high cost for certain backends.

#rb Zousar.Shaker
#fyi Joakim.Lindqvist, Stefan.Boberg

[CL 15000972 by Devin Doucette in ue5-main branch]
2021-01-06 14:18:01 -04:00
Devin Doucette
e6401b0897 DDC: Added variants of CachedDataProbablyExists that check multiple keys
#rb Matt.Peters
#fyi Joakim.Lindqvist, Stefan.Boberg

[CL 14998596 by Devin Doucette in ue5-main branch]
2021-01-06 09:27:11 -04:00
Francis Hurteau
5f773af42b Revert the reentrancy guard from cl 14528803 which was uneeded and actually causing local ddc from being properly filled
Added profiling scope for Async DDC put

#rb Danny.Couture

[CL 14532323 by Francis Hurteau in ue5-main branch]
2020-10-21 06:45:37 -04:00
Francis Hurteau
036678deb5 Fix typo in comment
#rb trivial

[CL 14528903 by Francis Hurteau in ue5-main branch]
2020-10-20 16:45:50 -04:00
Francis Hurteau
aa2a9294de Quick fix for performance degradation when using the Shared DDC
Defer backfill up to date check to the async put as it may be expensive in the case of a shared ddc for example
This brings performance in line with working with the shared ddc disabled when the local cache is up to date.
Loading Apollo_Terrain_Edit: ~3m -> ~1m40s - DDC Access ~1m10s -> 4s when using the shared ddc

#rb Andrew.Grant, Devin.Doucette

[CL 14528803 by Francis Hurteau in ue5-main branch]
2020-10-20 16:33:55 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
andrew grant
387622c149 Removed some debugging code that was accidentally submitted.
Droped some debug logging to VeryVerbose
Set EngineTest back to regular DDC logging

#jira UE-92249 UE-92221
#rb swarm
[FYI] devin.doucette

#ROBOMERGE-SOURCE: CL 12954517 in //UE4/Release-4.25/... via CL 12954529 via CL 12958534
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12958578 by andrew grant in Main branch]
2020-04-21 14:45:10 -04:00
andrew grant
835b997f53 Edit-grated improved DDC behavior logging from Main to get better info around failing cooked tests
Temporarily turning on verbose DDC logging for EngineTest project

[FYI] zabir.hoque ben.ingram
#jira #rb na
#lockdown cristina.riveron

#ROBOMERGE-OWNER: andrew.grant
#ROBOMERGE-AUTHOR: andrew.grant
#ROBOMERGE-SOURCE: CL 12911373 in //UE4/Release-4.25/... via CL 12911375 via CL 12911433
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12911435 by andrew grant in Main branch]
2020-04-19 14:32:34 -04:00
andrew grant
919e5daa5c Fix for DDC warnings in Fortnite EC jobs that use UnrealPak.
- Use a GUID rather than machine ID for write tests for programs (ShaderCompilerWorker, UnrealPak) that spin up multiple instances.

- When creating missing files for read-tests check if a failure could have been due to another instance creating that path at the same time.

- Improved some logging of issues to make future diagnosis of issues easier.

#rb swarm
[at]ryan.durand [at]devin.doucette

#ROBOMERGE-SOURCE: CL 12629650 via CL 12631522 via CL 12631547 via CL 12631579 via CL 12631609 via CL 12631644
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)

[CL 12631701 by andrew grant in Main branch]
2020-04-06 15:54:34 -04:00
andrew grant
e224300cc3 Moved some DDC debug options into a common class that can be provided to a backend to simulate certain behavior.
E.g.

'-ddc-local-missrate=50' simulates a 50% miss rate of keys on the local backend,
'-ddc-shared-misstypes=AnimSeq' simulates misses for any AnimSeq key. Use + to combine keys. E.g. AnimSeq+Audio

Memory DDC, FileSystemDDC and S3DDC support these options as do the classes that wrap other backends (e.g. AsyncPut).

#tests lots of warm and cold DDC
[at]ben.marsh [at]josh.engebretson [at]devin.doucette

#ROBOMERGE-SOURCE: CL 12458693 via CL 12462167 via CL 12464485 via CL 12464606
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v672-12450963)

[CL 12464717 by andrew grant in Main branch]
2020-03-26 20:55:39 -04:00