Commit Graph

21 Commits

Author SHA1 Message Date
Devin Doucette
8e3e3cc389 DDC: Fixed TryToPrefetch to work when there is only one backend
#rb Zousar.Shaker
#rnx

[CL 16549112 by Devin Doucette in ue5-main branch]
2021-06-03 12:57:44 -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
halfdan ingvarsson
5f84b5227e Fix new errors/warnings that are no longer being accidentally suppressed in clang on Windows (see CL 15880121).
- Member variable shadowing inside lambdas
- Deprecation warnings due to implicit copy constructors/operator being generated because of dllexports (this is more of a clang bug than an actual issue in our code).

#jira none
#fyi jurre.debaare, emil.persson, ian.fox, devin,doucette
#rnx

[CL 15882629 by halfdan ingvarsson in ue5-main branch]
2021-03-31 17:59:50 -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
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
Marc Audy
a7c9001a94 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14075166
#rb
#rnx

[CL 14075271 by Marc Audy in ue5-main branch]
2020-08-11 01:36:57 -04:00
Matt Kuhlenschmidt
603a4119c5 Fix HAL/PlatformFileManager.h non-portable casing CIS issues
#rb none

[CL 13214257 by Matt Kuhlenschmidt in ue5-main branch]
2020-05-06 17:58:18 -04:00
andrew grant
963ad0c629 Allow users to customise S3 path by setting an UE-S3DataCachePath environment variable. If not set the default of ProjectDir/Saved/S3DDC is still used
#rb swarm
[at]devin.doucette [at]ben.marsh
[FYI] antoine.guilbaud
#tests Booted editor and PIE'd into AthenaTest with UE-S3DataCachePath set to a different drive. Verified data is there.

#ROBOMERGE-SOURCE: CL 12474206 via CL 12474221 via CL 12474232 via CL 12474240
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v672-12450963)

[CL 12474252 by andrew grant in Main branch]
2020-03-27 15:57:11 -04:00
andrew grant
14d1b683f8 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
#swarm https://p4-swarm.epicgames.net/reviews/12458696

#ROBOMERGE-SOURCE: CL 12466119 via CL 12466177
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v672-12450963)

[CL 12466179 by andrew grant in Main branch]
2020-03-27 08:12:16 -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
ben marsh
a4c0ecd2eb Suppressing errors about S3DDC if disabled.
#jira

#ROBOMERGE-SOURCE: CL 12455905 via CL 12455924 via CL 12455926 via CL 12460993 via CL 12461148
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v672-12450963)

[CL 12461272 by ben marsh in Main branch]
2020-03-26 17:59:17 -04:00
ben marsh
604cd08968 Enable S3DDC by default if available, with a check for canary file not reachable from internal IPs. Also add an editor setting (in the Global panel) for disabling it.
Also suppress some warning messages when a download is cancelled.

[FYI] Andrew.Grant
#jira

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 12453891 via CL 12454085 via CL 12454109 via CL 12459232 via CL 12459415
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v672-12450963)

[CL 12459547 by ben marsh in Main branch]
2020-03-26 17:03:08 -04:00
andrew grant
3cc86b3d2f Optimizations for DDC access on remote / slow drives.
If a filesystem node is not available not prompt the user and optionally retry incase they need to mount a drive or start VPN

Fiilesystem nodes now perform a speed test using a selection of 'DDC sized' files to determine a classification (local, fast, ok, slow).

Add a new 'ConsiderSlowAt' property to the 'Filesystem' DDC node type. If latency to the node is >= this value then the node will be marked as slow which disables touch'ing and reduces file stats

Interface Changes

- Add the concept of a speed class to nodes
- Add GetName to nodes for better debugging / logging
- WouldCache query that allows caches to opt of of consideration early and avoid async tasks being created.
- Create a new 'FileBackedDerivedDataBackend' class that's the for the memory/boot backend and future classes
- TryToPrefetch interface functions for future use

Behavior Changes

- Moved parameter parsing into FileSysteDerivedDataBackend as things were getting out of hand
- FileSystemDerivedDataBackend now performs a speed test using 'DDC sized' files in separate directories and applies a classification
- Slow locations turn off touching of data on read
- Slow locations always return true for CachedDataProbablyExists. It's faster just to try to read and fail
- If the shared DDC is not available the user is prompted incase they need to mount it.

[at]ben.marsh [at]josh.engebretson
#rb swarm
#tests lots of PIE runs with / without this option


#ROBOMERGE-SOURCE: CL 12387516 via CL 12387517 via CL 12396622
#ROBOMERGE-BOT: (v671-12333473)

[CL 12396757 by andrew grant in Release-Engine-Staging branch]
2020-03-24 19:12:36 -04:00
ben marsh
8b87619ad5 Fix progress bar winding backwards when downloading DDC bundles from S3, due to integer overflow.
#jira


#ROBOMERGE-SOURCE: CL 12170031 via CL 12170032 via CL 12195714
#ROBOMERGE-BOT: (v662-12191386)

[CL 12195879 by ben marsh in Main branch]
2020-03-16 08:47:15 -04:00
ben marsh
4fbcf75b6e Add verbose logging to S3 DDC backend.
#jira


#ROBOMERGE-SOURCE: CL 12158934 via CL 12158935 via CL 12158936
#ROBOMERGE-BOT: (v659-12123632)

[CL 12158937 by ben marsh in Main branch]
2020-03-12 22:35:04 -04:00
ben marsh
ff74b40543 Disable S3 DDC backend on Mac due to missing libcurl implementation causing link errors.
#jira


#ROBOMERGE-SOURCE: CL 12154529 via CL 12155941 via CL 12156003
#ROBOMERGE-BOT: (v659-12123632)

[CL 12156082 by ben marsh in Main branch]
2020-03-12 18:00:07 -04:00
ben marsh
5393bfd155 Change S3 DDC backend to use a separate index for the currently valid manifests, so that it can be secured in source control.
#rb none
#jira


#ROBOMERGE-SOURCE: CL 12151719 via CL 12155008 via CL 12155068
#ROBOMERGE-BOT: (v659-12123632)

[CL 12155157 by ben marsh in Main branch]
2020-03-12 17:36:41 -04:00
ben marsh
b5fdbe9e35 Fix missing header.
#jira


#ROBOMERGE-SOURCE: CL 12147978 via CL 12147979 via CL 12149513
#ROBOMERGE-BOT: (v659-12123632)

[CL 12149624 by ben marsh in Main branch]
2020-03-12 13:29:34 -04:00
ben marsh
7d6083104f Add experimental DDC backend which fetches objects from an S3 bucket. Bucket is populated by a job running periodically on build machines, and generates a JSON manifest used to determine files to download.
#rb none
#rnx
#jira


#ROBOMERGE-SOURCE: CL 12147942 via CL 12147943 via CL 12149500
#ROBOMERGE-BOT: (v659-12123632)

[CL 12149604 by ben marsh in Main branch]
2020-03-12 13:29:21 -04:00