Commit Graph

93 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
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
d50e330b94 DDC: Split the new API from the old API
The new API uses exported functions and cannot be included with the old API without compile errors in existing code that has an include-only dependency on DDC.

#rb Zousar.Shaker
#rnx
#preflight 610c01e3aeb05700011dc5ab

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

[CL 17071271 by devin doucette in ue5-release-engine-test branch]
2021-08-05 13:12:08 -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
aurel cordonnier
dc4bf61540 Merge from Release-Engine-Staging @ 17030559 to Release-Engine-Test
This represents UE4/Main @ 17030256 and Dev-PerfTest @ 17030553

[CL 17031509 by aurel cordonnier in ue5-release-engine-test branch]
2021-08-03 11:56:47 -04:00
devin doucette
77b340efea DDC: Moved new stats functions into FDerivedDataCacheInterface to remove module dependency
#rb Aurel.Cordonnier
#rnx

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

[CL 16997407 by devin doucette in ue5-release-engine-test branch]
2021-07-29 13:07:00 -04:00
aurel cordonnier
02c0f425e8 Copy up from Release-Engine-Staging @ 16738359
This represents UE4/Main @ 16738161 and Dev-PerfTest @ 16737719

[CL 16738582 by aurel cordonnier in ue5-release-engine-test branch]
2021-06-22 00:27:54 -04:00
Devin Doucette
600ee5377a DDC: Added serialization of FCacheRecord to/from FCbPackage
#rb Devin.Doucette
#rnx

#ushell-cherrypick of 16476127 by Matt.Peters

[CL 16483925 by Devin Doucette in ue5-main branch]
2021-05-27 10:16:47 -04:00
Devin Doucette
e6d6d110aa DDC: Moved the module and IBuild implementation to their own files
#rb Zousar.Shaker
#rnx

[CL 16420332 by Devin Doucette in ue5-main branch]
2021-05-21 12:24:43 -04:00
Devin Doucette
e3600df4ee DDC: Added UE::DerivedData::FBuildInput
FBuildInput and the associated builder type collect the inputs for a build.

#rb Zousar.Shaker
#rnx

[CL 16406497 by Devin Doucette in ue5-main branch]
2021-05-20 13:53:48 -04:00
Devin Doucette
8ce8977949 DDC: Added optional versions of BuildAction, BuildDefinition, BuildOutput, CacheRecord
- Optional versions are now returned from operations that may fail.
- Fixed a bug in the cache where a null record could be dereferenced.
- Improved validation when loading build types.

#rb Zousar.Shaker
#rnx

[CL 16332909 by Devin Doucette in ue5-main branch]
2021-05-14 14:47:11 -04:00
Devin Doucette
31e8388cb0 DDC: Added UE::DerivedData::FBuildAction
FBuildAction and the associated builder type define the exact action to be executed, including the function and its version, and the inputs referenced by hash.

#rb Zousar.Shaker
#rnx
#preflight 609cbaed7ebade00018f29c9

[CL 16317116 by Devin Doucette in ue5-main branch]
2021-05-13 15:36:50 -04:00
Devin Doucette
cf09b53604 DDC: Added UE::DerivedData::FBuildOutput
FBuildOutput and the associated builder type define the output of a derived data build as a collection of payloads and diagnostic messages.

#rb Zousar.Shaker
#rnx
#preflight 609c0fc05b35c60001cbc2e3

[CL 16304655 by Devin Doucette in ue5-main branch]
2021-05-12 15:46:19 -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
0baafa125a DDC: Added the start of the new build interface UE::DerivedData::IBuild
This only includes the functionality required to create a build definition, and does not include the functionalty required to execute a build from the build definition.

#rb Zousar.Shaker
#rnx
#preflight 608cf5ef7343ea00016e58f4

[CL 16183533 by Devin Doucette in ue5-main branch]
2021-05-03 09:25:48 -04:00
Devin Doucette
e9c43a79ae DDC: Implemented ICache on FDerivedDataCacheInterface
Moved IDerivedDataCacheModule to its own header and renamed CreateOrGetDDC to CreateOrGetCache.

#rb Zousar.Shaker
#rnx
#preflight 6089d5a036afba00015c0348

[CL 16153121 by Devin Doucette in ue5-main branch]
2021-04-28 23:25:28 -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
Devin Doucette
28ef6b6386 DDC: Iteration on ICache
- Identify payloads by the hash of the raw data.
- Added FCacheKey::Empty and FCachePayloadKey::Empty for convenience.
- Changed FCacheRecord and FCacheRecordBuilder constructors to be private.
- Changed storage in the legacy cache to store values inline for records with no attachments.
- Changed storage in the legacy cache to use CAS within each bucket.
- Improved wording and details in assert messages.

#rb Zousar.Shaker
#rnx

[CL 15984411 by Devin Doucette in ue5-main branch]
2021-04-12 18:25:18 -04:00
Zousar Shaker
699ad048c3 Ensure that at the time the FDerivedDataCache singleton is shutdown that we have waited on all internal backends to complete in-flight work.
#jira UE-110943
#rb devin.doucette

[CL 15930084 by Zousar Shaker in ue5-main branch]
2021-04-06 10:20:39 -04:00
Devin Doucette
ab4a43d5db CompressedBuffer: Implemented a stable format for compressed buffers with support for no compression and LZ4
#rb Tim.Smith

[CL 15895927 by Devin Doucette in ue5-main branch]
2021-04-01 16:31:55 -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
490d684d40 DDC: Clean up a few details in the new Cache API
#rb Zousar.Shaker
#rnx

[CL 15681766 by Devin Doucette in ue5-main branch]
2021-03-11 18:12:08 -04:00
Devin Doucette
7d5d9f3798 DDC: Clean up a few details in the new Cache API and remove the last exported type from DDC
#rb Zousar.Shaker
#rnx

[CL 15670275 by Devin Doucette in ue5-main branch]
2021-03-10 17:33:38 -04:00
Devin Doucette
017b41eb57 DDC: Refactored the new Cache API to support its use through only an interface dependency
#rb Zousar.Shaker
#rnx

[CL 15666872 by Devin Doucette in ue5-main branch]
2021-03-10 12:23:29 -04:00