Commit Graph

25 Commits

Author SHA1 Message Date
Devin Doucette
023e2fd5e8 DDC: Fixed a race condition in the cache hierarchy
The hierarchy now uses a request barrier after the first synchronous request completion. Async requests could occasionally complete fast enough that DispatchRequests would be left to handle the completion. In that scenario, there would not be a barrier in place when beginning any subsequent requests, which would lead to a failed assertion in the request owner.

#preflight 63ceb5c63a03cb0bbff95362
#rb Zousar.Shaker

[CL 23848713 by Devin Doucette in ue5-main branch]
2023-01-25 11:05:29 -05:00
Devin Doucette
d508667187 DDC: Added a missing read lock in the cache hierarchy
#preflight 63751a331d25fe8b93371452
#rb Matt.Peters
#rnx

[CL 23161581 by Devin Doucette in ue5-main branch]
2022-11-16 15:43:58 -05:00
Devin Doucette
9aee9a4bd8 DDC: Fixed unsafe type cast warnings
#preflight 6317fc04a20b67673b1de7c3
#rb Zousar.Shaker
#rnx

[CL 21850770 by Devin Doucette in ue5-main branch]
2022-09-07 10:37:16 -04:00
devin doucette
9b905880aa DDC: Fixed UserData value returned by the cache hierarchy
#rb trivial
#rnx

[CL 21449943 by devin doucette in ue5-main branch]
2022-08-18 17:04:23 -04:00
Devin Doucette
055ba32b38 DDC: Added partial cache record propagation to the hierarchy, with tests
#jira UE-156058
#preflight 62fd59d5e64b1a51093918f8
#rb Zousar.Shaker

[CL 21441390 by Devin Doucette in ue5-main branch]
2022-08-18 09:51:07 -04:00
devin doucette
1d698f7814 DDC: Removed the remaining legacy cache implementations and made the default implementation non-virtual
#preflight 62a38afedf2d057cb2814ea4
#rb Steve.Robb
#rnx

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 20601122 via CL 20601125 via CL 20601130
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20602835 by devin doucette in ue5-main branch]
2022-06-10 17:21:00 -04:00
Devin Doucette
da04ab9644 DDC: Fixed cache put propagation for nodes that store async
#preflight 62798a72242446ce6c69df25
#rb Zousar.Shaker
#rnx

[CL 20121708 by Devin Doucette in ue5-main branch]
2022-05-10 08:46:00 -04:00
Devin Doucette
7a50c98265 DDC: Added propagation of cache records that contain metadata with no values
#preflight 62797bdd4561731dbe10ecdf
#rb Matt.Peters

[CL 20111217 by Devin Doucette in ue5-main branch]
2022-05-09 17:18:23 -04:00
Devin Doucette
fa8f3dbe82 DDC: Fixed duplicate puts caused by the in-flight memory cache
Without using StopGetStore, get hits on the in-flight cache would propagate as puts to subsequent nodes in the hierarchy. Since the in-flight cache is only used as temporary storage while a put is in flight, this caused duplicates of the in-flight puts, which manifests as move collision log spam from the file system cache store.

#preflight 625d772d691f49969ea93249
#rb Zousar.Shaker
#rnx

[CL 19785647 by Devin Doucette in ue5-main branch]
2022-04-18 11:06:05 -04:00
Devin Doucette
14583c8432 DDC: Back out 19757142 because it broke cache puts
#preflight skip
#rb none
#rnx

[CL 19763306 by Devin Doucette in ue5-main branch]
2022-04-14 17:05:38 -04:00
Devin Doucette
e35dc9fd40 DDC: Fixed duplicate puts caused by the in-flight memory cache
Without using StopStore, get hits on the in-flight cache would propagate as puts to subsequent nodes in the hierarchy. Since the in-flight cache is only used as temporary storage while a put is in flight, this caused duplicates of the in-flight puts, which manifests as move collision log spam from the file system cache store.

#preflight 625835d97f628a9018d8acf6
#rb Zousar.Shaker
#rnx

[CL 19757142 by Devin Doucette in ue5-main branch]
2022-04-14 11:06:11 -04:00
Devin Doucette
37820d6bbc DDC: Fixed incorrect skipping of get propagation past nodes with the flag StopStore
The wrong response status was being checked, and caused subsequent nodes to be skipped even if the StopStore node did not contain the data, if any previous node contained the data.

#preflight 62582d67946114248db62d58
#rb Zousar.Shaker
#rnx

[CL 19756375 by Devin Doucette in ue5-main branch]
2022-04-14 10:31:55 -04:00
Devin Doucette
6c0885e988 DDC: Fixed the async cache hierarchy to advance to the next node when nodes are async
#preflight 622f9ce380715dc6dadebf59
#rb Zousar.Shaker
#rnx

[CL 19377851 by Devin Doucette in ue5-main branch]
2022-03-14 16:15:03 -04:00
devin doucette
0e929ad2f3 DDC: Re-added the in-flight cache for async puts
- Legacy puts are now executing asynchronously.
- Memory cache now merges partial cache records.
- Memory cache is used to store data temporarily while it is being written by an async put.
- Expanded the deprecation of persisted boot/memory caches, which no longer offer the performance benefit that they used to.
- Fixed the pak file cache to skip data with a compressed size of over 2 GiB.

#jira UE-141307
#preflight 620d85f93609e19371510fb1
#lockdown Aurel.Cordonnier
#rb Zousar.Shaker
#rnx

#ROBOMERGE-OWNER: Devin.Doucette
#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-COMMAND: _robomerge UE5-Main
#ROBOMERGE-SOURCE: CL 19076205 in //UE5/Release-5.0/... via CL 19094550
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19095974 by devin doucette in ue5-main branch]
2022-02-23 13:40:18 -05:00
devin doucette
778a7d292b DDC: Added compression support to legacy cache values
The cache stores can individually control their "legacy mode" now, which offers a choice of ValueOnly, ValueWithLegacyFallback, LegacyOnly.
- Using ValueOnly will forward every legacy request through the Value API, which compresses values by default and supports values larger than 2 GiB.
- Using ValueWithLegacyFallback behaves like ValueOnly, but misses from GetValue are forwarded to GetCachedData, and stored with PutValue if found.
- Using LegacyOnly will forward every legacy request through the Legacy API.

FLegacyCacheValue uses shared state to ensure that each value is compressed or decompressed at most once.

#jira UE-134381
#preflight 62054b430c64e1822f41231b
#lockdown Mark.Lintott
#rb Zousar.Shaker
#rnx

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18940270 in //UE5/Release-5.0/... via CL 18941016 via CL 18941392
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18941401 by devin doucette in ue5-main branch]
2022-02-10 14:57:42 -05:00
devin doucette
2ae070347f DDC: Fixed a memory leak in the cache
#jira UE-141335
#preflight 620294f5bd4f846436e5f4c6
#lockdown Mark.Lintott
#rb Matt.Peters
#rnx

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18903655 in //UE5/Release-5.0/... via CL 18903892 via CL 18904098
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v912-18901109)

[CL 18904146 by devin doucette in ue5-main branch]
2022-02-08 12:17:15 -05:00
devin doucette
c03d680063 DDC: Fixed propagation of cache values when a value policy contains SkipData
#jira UE-141576
#preflight 61fe001fdb3d0b17a933391c
#lockdown Mark.Lintott
#rb Zousar.Shaker
#rnx

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18896581 in //UE5/Release-5.0/... via CL 18896633 via CL 18896789
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18897023 by devin doucette in ue5-main branch]
2022-02-07 20:06:56 -05:00
devin doucette
0818b14470 DDC: Fixed incorrect callbacks in put batches with failures
Also adds the intended inline allocators for arrays that were missing them.

#jira UE-134381
#lockdown Mark.Lintott
#preflight 61fd998ff370b0d3111fad17
#rb Matt.Peters
#rnx

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18874174 in //UE5/Release-5.0/... via CL 18874208 via CL 18874924
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18874951 by devin doucette in ue5-main branch]
2022-02-04 17:24:08 -05:00
devin doucette
c7954aebce DDC: Switched to the async cache hierarchy and fully implemented the verify wrapper
The async cache hierarchy:
- Is required to add compression to the legacy cache by forwarding LegacyPut/LegacyGet to PutValue/GetValue.
- Is always present in the graph, unlike the previous cache hierarchy, which will allow significant simplification of leaf cache stores.
- Allows for the leaf cache store nodes to operate asynchronously without blocking a worker thread like the previous cache hierarchy.
- Shifts from controlling cache behavior by speed class to controlling cache behavior by local/remote classification, which is a critical distinction for a cache like Zen that can identify as both local and remote.
- Respects the local/remote and query/store flags in the cache policy.
- Does not fully implement the partial record cache policy at this time.
- Does not propagate records or values in GetChunks, which will be added in a future release.

The verify wrapper was previously missing an implementation for the new cache interface. This version is more efficient than the previous because requests through the new cache interface can compare data without loading it from storage, and load it only when a mismatch has been detected, to dump it to disk.

#jira UE-134381
#lockdown Mark.Lintott
#preflight 61fc32ac0a50c2606f266388
#rb Zousar.Shaker
#rnx

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18851861 in //UE5/Release-5.0/... via CL 18851943 via CL 18852169
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18852184 by devin doucette in ue5-main branch]
2022-02-03 16:49:32 -05:00
devin doucette
20ea07085b DDC: Added GetChunks support to the new cache hierarchy
Includes policy fixes for other functions.

#rb Zousar.Shaker
#rnx
#preflight 61f9b31c9e4d23cd93b1dad3

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18817404 in //UE5/Release-5.0/... via CL 18817411 via CL 18822862
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824693 by devin doucette in ue5-main branch]
2022-02-02 07:58:00 -05:00
devin doucette
d0a5f83709 DDC: Moved the delete batch in the new hierarchy next to the delete function
#rb trivial
#rnx
#preflight 61f8cf94a6632a34f3689784

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18805848 in //UE5/Release-5.0/... via CL 18807992 via CL 18821772
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18822130 by devin doucette in ue5-main branch]
2022-02-02 02:20:15 -05:00
devin doucette
da469aebf0 DDC: Added Put and Get support to the new cache hierarchy
#rb Zousar.Shaker
#rnx
#preflight 61f864a868795b2f458b0c91

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18805714 in //UE5/Release-5.0/... via CL 18807981 via CL 18821770
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18822126 by devin doucette in ue5-main branch]
2022-02-02 02:20:02 -05:00
devin doucette
52ca2f071b DDC: Added PutValue and GetValue support to the new cache hierarchy
#rb Zousar.Shaker
#rnx
#preflight 61f78b4e6a7c7b134f2f289e

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18791013 in //UE5/Release-5.0/... via CL 18791372 via CL 18791928
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18792105 by devin doucette in ue5-main branch]
2022-01-31 12:25:15 -05:00
devin doucette
1838ebc31e DDC: Fixed legacy cache fill behavior in the new hierarchy
When a node with StopStore is present and contains the data, but comes later in the hierarchy than the node that first found the data, puts to subsequent nodes were not being disabled.

#rb Zousar.Shaker
#rnx
#preflight 61f433b16b5aea38e5bf86ca

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18778611 in //UE5/Release-5.0/... via CL 18780649 via CL 18780924
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18781004 by devin doucette in ue5-main branch]
2022-01-28 19:01:07 -05:00
devin doucette
df74509d41 DDC: Added a new async cache hierarchy type
This new cache hierarchy does not require the cache stores within it to complete every operation synchronously. When the child cache stores start to do async I/O, this hierarchy will support that instead of blocking like the existing hierarchy does.

This is a snapshot of the work in progress that is only implemented for the functions in ILegacyCacheStore.

#rb Zousar.Shaker
#rnx
#preflight 61f37e487a7f0d39ddd2d38b

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18768547 in //UE5/Release-5.0/... via CL 18768556 via CL 18768581
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18768594 by devin doucette in ue5-main branch]
2022-01-28 00:58:19 -05:00