Commit Graph

76 Commits

Author SHA1 Message Date
carl bystrom
95e82bf3cc Horde: Add support for compressed blob uploading in remote exec test client
#preflight 628e1030841e8395c64fcb7c

[CL 20362422 by carl bystrom in ue5-main branch]
2022-05-25 07:21:20 -04:00
carl bystrom
a60142dcec Horde: Mark compressed blob reading as not supported in certain clients
Instead of NotImplementedException.

#preflight none

[CL 20324348 by carl bystrom in ue5-main branch]
2022-05-23 08:12:37 -04:00
carl bystrom
e717f21af5 Horde: Add support for compressed files in compute tasks
When FileNode is marked as compressed, the appropriate method for download is used as compressed blobs are references by their uncompressed hash.
Files are still downloaded as-is and are not decompressed by the agent executor.

Flagging compression for files during upload is still left to be implemented.
#preflight 6287b26d5b568e5761f9a1a1

[CL 20295190 by carl bystrom in ue5-main branch]
2022-05-20 11:28:28 -04:00
Ben Marsh
e54ac34152 Upgrade EpicGames.Horde to NET 6.
#preflight 62842632ac1a933d4784bccc

[CL 20253385 by Ben Marsh in ue5-main branch]
2022-05-17 19:12:52 -04:00
Ben Marsh
3355afade9 Remove extension methods to slice IList<T> types. Many types which are not naturally lists implement this interface.
New AsSegment() method allows creating a segment, while explicit extension methods now exist for explicitly slicing List<T>.

#preflight 627dddaa830b40b66810acd3

[CL 20178032 by Ben Marsh in ue5-main branch]
2022-05-13 01:19:06 -04:00
Ben Marsh
722fbe2155 Horde: Thread-safe store for small objects backed by a memory-mapped file, optimized for read/write performance and data integrity.
Reads are typically lock free. Writes require a lock but otherwise complete quickly and in constant time. The store is transactional, and is designed not to lose data if the process is terminated between flushes. To accomplish this, blocks are not reused until the store is flushed via a call to Save().

Blobs allocated in the store may be split into multiple cells, so do not support access to a contiguous underlying memory region. The cells comprising a blob may be enumerated and accessed individually via a handle to the blob.
The store also supports storage of tree objects which can be addressed by hash. Internally, these objects are reference counted and maintain a list of references to other blobs separately to their payload.

If the store runs out of space, supplemental stores may be allocated in granularity of <see cref="LocalBlobStoreOptions.ExpandStepSize"/>. These stores are merged into the main one during the next Save() call.

#preflight none
#preflight 625872ee7f628a9018e480e5

[CL 19761303 by Ben Marsh in ue5-main branch]
2022-04-14 15:21:19 -04:00
Ben Marsh
14c4d729e8 Horde: Build fix.
#preflight none
#fyi Joakim.Lindqvist

[CL 19686160 by Ben Marsh in ue5-main branch]
2022-04-08 08:23:49 -04:00
Joakim Lindqvist
5e3bcb0677 Hack fix in EpicGames.Horde to get it building again, to unblock releasing of Horde Storage
#preflight none

[CL 19685621 by Joakim Lindqvist in ue5-main branch]
2022-04-08 05:40:52 -04:00
Ben Marsh
a18929e82f Horde: Add timing stats to remote execution responses.
Two sets of data are returned - one detailing the timeline of the task on the server (being queued, through dispatched, to completed), and one detailing the timeline of the task on the remote agent (downloading data, executing the task, and uploading the result).

The standalone compute command implementation in Horde.Agent also logs its own timeline of events.

#preflight none

[CL 19675739 by Ben Marsh in ue5-main branch]
2022-04-07 15:34:25 -04:00
jonathan adamczewski
c1bb6901bf Upgrade to .NET 6.0
#jira UE-119846
#preflight 624cbb2ecc0872e96b0d5181

[CL 19652696 by jonathan adamczewski in ue5-main branch]
2022-04-06 14:46:50 -04:00
Ben Marsh
965a6031d8 Horde: Add support for pushing data to Horde storage without knowing the hash in advance.
#preflight none

[CL 19628357 by Ben Marsh in ue5-main branch]
2022-04-05 14:03:07 -04:00
Ben Marsh
faeb37fd20 Horde: Add a basic executor that will extract data from a bundle.
Also add matching grpc wrapper types for namespace, bucket and ref identifiers.

#preflight none

[CL 19598907 by Ben Marsh in ue5-main branch]
2022-04-01 22:37:15 -04:00
jonathan adamczewski
5c68d1d9ef Revert //UE5/Main/... changelist 19531725 - return to NET Core 3.1
#preflight 62422fd0470aff98e946bfce
#jira UE-119846

[CL 19534572 by jonathan adamczewski in ue5-main branch]
2022-03-28 18:25:19 -04:00
jonathan adamczewski
18ac15cbb1 Upgrade to .NET 6.0
#jira UE-119846
#preflight 6241fc06470aff98e943c035

[CL 19531725 by jonathan adamczewski in ue5-main branch]
2022-03-28 15:30:56 -04:00
Ben Marsh
4f74fda8c1 Horde: Use standard coding style for EpicGames.Horde.
#preflight none

[CL 19452872 by Ben Marsh in ue5-main branch]
2022-03-21 11:58:35 -04:00
Ben Marsh
085c944dbb Horde: Support thread safe reads from bundles.
- Node state is now separated into a separate class to allow atomic transitions between imported/exported/standalone states.
- A semaphore is used to limit concurrent reads from underlying storage, so bundles now implement IDisposable.
- DirectoryNode.CopyToDirectoryAsync() spawns multiple tasks to extract data in parallel. The current tree traversal is fairly naive; since it doesn't know which objects are currently in the cache, it can result in a lot of thrashing if the cache is full as objects are purged and re-read to match the traversal order.
- Mutation of the tree is still restricted to a single thread.

#preflight none

[CL 19405679 by Ben Marsh in ue5-main branch]
2022-03-16 10:26:46 -04:00
Ben Marsh
31e50412e6 Horde: Fix error deserializing file node data from bundles.
#preflight none

[CL 19384615 by Ben Marsh in ue5-main branch]
2022-03-15 09:34:04 -04:00
Ben Marsh
fd9d9932c8 Horde: Encode settings used to replicate data to Perforce in the ref ids. Settings are now copied into a CommitKey object, which is encoded as compact binary and hashed, and also embedded in its original form in the bundle ref.
#preflight none

[CL 19376293 by Ben Marsh in ue5-main branch]
2022-03-14 14:51:49 -04:00
Ben Marsh
f035ee86ae Horde: Rename ReadObject/WriteObject methods on IStorageClient to ReadBlob/WriteBlob for consistency. Objects and blobs are generally treated as identical now.
#preflight none

[CL 19374912 by Ben Marsh in ue5-main branch]
2022-03-14 13:37:17 -04:00
Ben Marsh
5df05854df Horde: Add cancellation token arguments to all IStorageClient extension methods.
#preflight none

[CL 19374508 by Ben Marsh in ue5-main branch]
2022-03-14 13:15:29 -04:00
Ben Marsh
ab05edcdd0 Horde: Add stats for writing out new bundles to storage.
#preflight none

[CL 19373739 by Ben Marsh in ue5-main branch]
2022-03-14 12:14:47 -04:00
Ben Marsh
180c64b3cf Horde: More bundle fixes.
- Fixed tracking of parent ownership for child nodes when adding new nodes to the tree.
- Fixed incorrect offsets in exports when multiple items are in a single compression packet.
- Document and enforce invariants when switching nodes between different states. Nodes read from refs are now immediately turned into standalone nodes. Removes unnecessary logic for caching/decompressing nodes in the root ref on demand.

#preflight none

[CL 19368974 by Ben Marsh in ue5-main branch]
2022-03-12 20:43:58 -04:00
Joe Kirchoff
73a88da8b3 Horde: Bump DefaultMaxInMemoryBlobLength
#rnx
#rb none
#preflight none

[CL 19363383 by Joe Kirchoff in ue5-main branch]
2022-03-11 18:27:39 -05:00
Ben Marsh
719fa0b9d9 Horde: Fix infinite recursion when trying to upload compact binary encoded objects.
#preflight none
#fyi Joe.Kirchoff

[CL 19362130 by Ben Marsh in ue5-main branch]
2022-03-11 17:35:08 -05:00
Joe Kirchoff
bb75809a0e Horde: Add IStorageClient.FindMissingBlobsAsync
#rnx
#rb none
#preflight none

[CL 19358297 by Joe Kirchoff in ue5-main branch]
2022-03-11 13:32:51 -05:00