Age | Commit message (Collapse) | Author |
|
|
|
... and rename appropriately to reflect contents more precisely
than the generic "common". This separation also disentangles
dependencies a bit.
|
|
...to remove the unnecessary link between folder name and the logic
of resolve_symlinks_map.
|
|
Add support for repository gargabe collection to only drop the older
generations without rotating.
|
|
...instead of a plain hash. Hash gets computed for different storage types on the fly.
|
|
|
|
...to let it be stored as an independent instance.
|
|
|
|
|
|
|
|
|
|
... instead of relying on those dependencies being pulled in
indirectly.
|
|
Such a file could be used to store mappings of digests from CAS or
Git cache to digests of different hash type that represent same
content.
|
|
|
|
...and move it to the common stage.
|
|
...with ArtifactDigestFactory::HashDataAs
|
|
...with ArtifactDigestFactory::HashFileAs
|
|
|
|
|
|
...to track changes during refactoring easier.
|
|
|
|
Instead of computing the shard based on the RemoteExecutionConfig
singleton, use the already computed hash stored in the passed
StorageConfig instance, which now needs to be set up separately
if bootstrapping in order to avoid unwanted includes.
Storing the backend description to CAS and corresponding audit
checks now take place in main.
|
|
...such that it will be available to the TargetCache for sharing.
Also, GC does not require remote execution information, so the
logic for this subcommand is moved earlier in main.
|
|
|
|
|
|
|
|
|
|
|
|
...since it is an extra class that overcomplicates the config class.
|
|
|
|
|
|
...to use corresponding Storage for storing auxiliary information.
|
|
|
|
|
|
During garbage collection split and remove from the storage every entry that is larger than a threshold.
|
|
During garbage collection remove from the storage every entry that has the large entry.
|
|
* Add LargeObjectCAS fields for files and trees to LocalCAS;
* Add logic for splitting objects located in the main storage.
Tested:
Splitting of large, small and empty objects.
|
|
Every large object is keyed by the hash of the result and contains hashes of the parts from which the result can be reconstructed.
|
|
|
|
Some of the more specific issues addressed:
- missing log_level target/include
- header-only libs wrongly marking deps as private
- missing/misplaced gsl includes
|
|
... as the fs_utils have a lot more dependencies making them usable
in less places. Moreover, this function also serves to shape the
layout of the local build root and hence is more appropriately
placed in the config anyway.
|
|
|
|
As the internal distdir data structure now supports the
executable bit, it is also expressive enough to support
foreign-file repositories. Hence we can use this cache,
getting potentially more cache hits.
|
|
This is required in order to make them available to 'just serve'
in a minimal just installation.
|
|
... with two minor code base changes compared to previous
use of gsl-lite:
- dag.hpp: ActionNode::Ptr and ArtifactNode::Ptr are not
wrapped in gsl::not_null<> anymore, due to lack of support
for wrapping std::unique_ptr<>. More specifically, the
move constructor is missing, rendering it impossible to
use std::vector<>::emplace_back().
- utils/cpp/gsl.hpp: New header file added to implement the
macros ExpectsAudit() and EnsureAudit(), asserts running
only in debug builds, which were available in gsl-lite but
are missing in MS GSL.
|
|
|
|
The improved GC implementation uses refactored storage
classes instead of directly accessing "unknown" file paths.
The required storage class refactoring is quite substantial
and outlined in the following paragraphs.
The module `buildtool/file_system` was extended by:
- `ObjectCAS`: a plain CAS implementation for
reading/writing blobs and computing digests for a given
`ObjectType`. Depending on that type, files written to the
file system may have different properties (e.g., the x-bit
set) or the digest may be computed differently (e.g., tree
digests in non-compatible mode).
A new module `buildtool/storage` was introduced containing:
- `LocalCAS`: provides a common interface for the "logical
CAS", which internally combines three `ObjectCAS`s, one
for each `ObjectType` (file, executable, tree).
- `LocalAC`: implements the action cache, which needs the
`LocalCAS` for storing cache values.
- `TargetCache`: implements the high-level target cache,
which also needs the `LocalCAS` for storing cache values.
- `LocalStorage`: combines the storage classes `LocalCAS`,
`LocalAC`, and `TargetCache`. Those are initialized with
settings from `StorageConfig`, such as the build root base
path or number of generations for the garbage collector.
`LocalStorage` is templated with a Boolean parameter
`kDoGlobalUplink`, which indicates that, on every
read/write access, the garbage collector should be used
for uplinking across all generations (global).
- `GarbageCollector`: responsible for garbage collection and
the global uplinking across all generations. To do so, it
employs instances of `LocalStorage` with `kDoGlobalUplink`
set to false, in order to avoid endless recursion. The
actual (local) uplinking within two single generations is
performed by the corresponding storage class (e.g.,
`TargetCache` implements uplinking of target cache entries
between two target cache generations etc.). Thereby, the
actual knowledge how data should be uplinked is
implemented by the instance that is responsible for
creating the data in the first place.
|