Commit Graph

44 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
c39e30cfd7 Added missing includes of DerivedDataPayload.h found by the non-unity build
#rb none
#rnx

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

[CL 17426595 by devin doucette in ue5-release-engine-test branch]
2021-09-03 17:11:57 -04:00
andriy tylychko
6bf3101dcd deprecated FTicker and family and replaced by thread-safe FTSTicker
#jira UE-120090
#rb francis.hurteau


#ROBOMERGE-SOURCE: CL 17176325 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17176374 by andriy tylychko in ue5-release-engine-test branch]
2021-08-16 11:09:22 -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
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
dmytro vovk
3137bf8531 Fixed static events initialization crash
#jira none
#rb Andriy.Tylychko

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

[CL 16995075 by dmytro vovk in ue5-release-engine-test branch]
2021-07-29 09:56:01 -04:00
francis hurteau
86b3fd8de8 Refix crash in http request batch when the batch contains both a head and get request for the same cache keys
Added a test that could reliably reproduce the problem to validate it is properly fixed

#rb Danny.Couture, Zousar.Shaker
#preflight 610010b247c93a0001335319

#ROBOMERGE-OWNER: francis.hurteau
#ROBOMERGE-AUTHOR: francis.hurteau
#ROBOMERGE-SOURCE: CL 16968978 via CL 16972104
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16972120 by francis hurteau in ue5-release-engine-test branch]
2021-07-27 15:25:39 -04:00
danny couture
950c53fc2b Fix thread starvation for request in http backend by using a FIFO for thread waiting for a connection to be freed
Replace the sleep by a wait on an event triggered by the thread freeing the connection
Improve the test to output stats seen below and use the proper amount of threads on low core systems

Automation RunTests System.DerivedDataCache.HttpDerivedDataBackend.ConcurrentCachedDataProbablyExistsBatch

Before
   RPS: 238, AvgLatency: 90.09 ms, MaxLatency: 7.77 s
   RPS: 231, AvgLatency: 87.66 ms, MaxLatency: 7.77 s
   RPS: 245, AvgLatency: 139.07 ms, MaxLatency: 10.08 s

After
   RPS: 634, AvgLatency: 102.97 ms, MaxLatency: 0.26 s
   RPS: 653, AvgLatency: 102.51 ms, MaxLatency: 0.26 s
   RPS: 630, AvgLatency: 102.29 ms, MaxLatency: 0.26 s

#rnx
#rb Zousar.Shaker, Francis.Hurteau
#preflight 60ffe8317f21c90001f6116a

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

[CL 16968015 by danny couture in ue5-release-engine-test branch]
2021-07-27 09:26:42 -04:00
francis hurteau
6862e14c30 Undo changelist 16938823 until investigation of cook failures are done
[FYI] Zousar.Shaker
#rb trivial
#preflight skip
discussed with Zoursar.Shaker, undo to fix cook failure

#ROBOMERGE-SOURCE: CL 16941401 via CL 16941404
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16941410 by francis hurteau in ue5-release-engine-test branch]
2021-07-23 16:16:35 -04:00
francis hurteau
d7677fba02 Fix crash in http request batch when the batch contains both a head and get request for the same cache keys
Added a test that could reliably reproduce the problem to validate it is properly fixed
#preflight 60faeafc1f926d000113425b

#ROBOMERGE-SOURCE: CL 16938823 via CL 16938832
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16938835 by francis hurteau in ue5-release-engine-test branch]
2021-07-23 13:15:05 -04:00
sebastien lussier
8c31cfedfd DDC backends - removed speed class tests in implementations of TryToPrefetch()
#rb danny.couture, devin.doucette

#ROBOMERGE-SOURCE: CL 16900182 via CL 16917763
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16917911 by sebastien lussier in ue5-release-engine-test branch]
2021-07-21 19:12:55 -04:00
zousar shaker
1a835cd2c6 Fix bug where queued batch request failure in HttpDerivedDataBackend would cause incorrect DDC output (erroneous cache misses).
Adding basic unit test for HttpDerivedDataBackend.

#rb devin.doucette

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

[CL 16885298 by zousar shaker in ue5-release-engine-test branch]
2021-07-19 13:09:47 -04:00
zousar shaker
1e1378f013 Avoid indexing into a requests output datas array before we have established if we have output, as this can contribute to an out-of-bounds array lookup.
#rb devin.doucette
[FYI] francis.hurteau

#ROBOMERGE-SOURCE: CL 16867872 via CL 16867881
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16867888 by zousar shaker in ue5-release-engine-test branch]
2021-07-15 17:31:20 -04:00
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
Zousar Shaker
e56633ec8e Avoid crashing in DDC if the Jupiter server sends a malformed response with a payload size that sends us off the end of the response buffer. Emit an error message instead.
#rb devin.doucette
#preflight 60ad3fdd04188d0001f4987b

[CL 16454717 by Zousar Shaker in ue5-main branch]
2021-05-25 15:28:50 -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
Andriy Tylychko
9f1cf3eabf re-deprecated FPlatformProcess::CreateSynchEvent(), now on all platforms. Replaced FEvent* by FEventRef where it made sense. Deprecated FEvent::Create() as another method to bypass the event pool
#rb steve.robb

[CL 16163267 by Andriy Tylychko in ue5-main branch]
2021-04-29 18:52:48 -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
94bcce4d3e Put a minimum "transfer speed over duration" limit on curl operations done by the HTTP DDC backend.
#rb devin.doucette
#preflight 60808a0ca698b3000172743c

[CL 16081589 by Zousar Shaker in ue5-main branch]
2021-04-21 17:14:57 -04:00
Zousar Shaker
8b5a796e2a Add support for ReadOnly={true|false} and EnvHostOverride={string} as configurable parameters on an HTTP DDC backend.
#rb devin.doucette

[CL 16076564 by Zousar Shaker in ue5-main branch]
2021-04-21 13:19:11 -04:00
Zousar Shaker
3b9ff68e09 Fix bug in the HttpDerivedDataBackend where an FRequest may not be returned to the FRequestPool if we're aborting queued PUTs due to a shutdown request.
#jira UE-113612
#rb devin.doucette
#preflight 607e38a842dbff0001a4dc20

[CL 16058184 by Zousar Shaker in ue5-main branch]
2021-04-19 22:53:53 -04:00
Johan Berg
ce27da1f98 Remove UE4 strings
#jira UE-111642
#rb none

[CL 16002173 by Johan Berg in ue5-main branch]
2021-04-14 04:25:18 -04:00
Zousar Shaker
d014867e9f Ensure that the non-DataRequest-Helper codepath for putting DDC data into the cache also tears-down promptly during process shutdown if not running on a build machine.
#jira UE-112179
#rb devin.doucette

[CL 15930076 by Zousar Shaker in ue5-main branch]
2021-04-06 10:20:06 -04:00
Zousar Shaker
dc68fab37b Ensure HTTP DDC backend doesn't delay process shutdown due to a queue of pending PUTs for normal users.
Still allows build machine runs to be thorough about completing PUTs.
Doesn't interrupt any in-flight PUTs, just prevents processing of any remaining queued PUTs.

#jira UE-112179
#rb devin.doucette

[CL 15920539 by Zousar Shaker in ue5-main branch]
2021-04-05 14:36:58 -04:00
Devin Doucette
d87eb29d07 DDC: Switched to WriteToString in the Jupiter backend
#rb Zousar.Shaker
#rnx

[CL 15829627 by Devin Doucette in ue5-main branch]
2021-03-25 15:34:31 -04:00