pub struct PooledTargetConfig {
pub pooling_enabled: bool,
pub reaper_enabled: bool,
pub reaper_idle_hours: u32,
pub reaper_interval_mins: u64,
pub remote_base: String,
pub reaper_pooled_idle_hours: u32,
pub reaper_max_cache_gb: u32,
pub store_base: Option<String>,
pub gc_extra_roots: Vec<String>,
pub gc_cargo_cache_idle_days: u32,
}Expand description
Pooled target-dir policy and conservative stale reaper.
Fields§
§pooling_enabled: boolWhether per-key pooled target dirs are used for remote builds.
reaper_enabled: boolWhether the stale-target reaper runs (ships off pending canary soak).
reaper_idle_hours: u32Idle window before a pooled target dir is reaped (hours).
reaper_interval_mins: u64Sweep cadence for the stale reaper (minutes).
remote_base: StringRemote base under which pooled target dirs live.
reaper_pooled_idle_hours: u32LONG idle window before a POOLED (-pool-) dir is reaped (hours);
0 disables pooled reaping. Floored at 24h when non-zero — pooled
dirs are warm caches, never short-TTL targets (bead 6dj11).
reaper_max_cache_gb: u32Per-worker byte budget (GiB) across all reap-class target dirs; 0
disables. Over budget, the sweep evicts oldest-idle-first among dirs
past the short idle window until back under (bead 6dj11).
store_base: Option<String>Where pooled Cargo target stores are PLACED on the worker (issue #64).
Unset (the default) keeps today’s behavior: the pooled store lives
inside the project mirror, i.e. under the worker’s canonical project
root, on whatever filesystem holds it. Set to an absolute path to move
every pooled store to <store_base>/<project_id>/.rch-target-…-pool-…,
which is how a worker with a small root disk keeps multi-GB warm pools
on a larger volume.
Distinct from Self::remote_base, which is where the reaper scans;
when this is set the reaper scans both, and
Self::reaper_max_cache_gb then applies per scan root rather than
per worker. Ignored for Windows workers, which keep their drive-letter
build base.
gc_extra_roots: Vec<String>EXTRA roots rch gc scans, beyond the ones rch derives itself.
The derived set (crate::gc_roots::derive_gc_roots) already covers
Self::remote_base, Self::store_base and the worker temp base
resolved by
crate::gc_roots::remote_cargo_home_base_prelude. This
list exists for runtime roots rch cannot know about — an operator build
root on a mounted volume, a per-host scratch tree — which is precisely
how ~700 GB of .rch-target-*-pool-* and rch-cargo-cache-* went
uncollected fleet-wide while rch gc reported “0 dirs, 0 MB”.
Each entry must pass crate::stale_target_reap::is_safe_reap_base:
absolute, no .., at least one segment, built only from
[A-Za-z0-9/._-] (the value is embedded in a remote shell command).
gc_cargo_cache_idle_days: u32Idle window in DAYS before rch gc may collect a durable per-worker
Cargo cache dir (rch-cargo-cache-*); 0 disables cache collection.
See DEFAULT_GC_CARGO_CACHE_IDLE_DAYS.
Trait Implementations§
Source§impl Clone for PooledTargetConfig
impl Clone for PooledTargetConfig
Source§impl Debug for PooledTargetConfig
impl Debug for PooledTargetConfig
Source§impl Default for PooledTargetConfig
impl Default for PooledTargetConfig
Source§impl<'de> Deserialize<'de> for PooledTargetConfigwhere
PooledTargetConfig: Default,
impl<'de> Deserialize<'de> for PooledTargetConfigwhere
PooledTargetConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for PooledTargetConfig
Source§impl JsonSchema for PooledTargetConfig
impl JsonSchema for PooledTargetConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for PooledTargetConfig
impl PartialEq for PooledTargetConfig
Source§impl Serialize for PooledTargetConfig
impl Serialize for PooledTargetConfig
impl StructuralPartialEq for PooledTargetConfig
Auto Trait Implementations§
impl Freeze for PooledTargetConfig
impl RefUnwindSafe for PooledTargetConfig
impl Send for PooledTargetConfig
impl Sync for PooledTargetConfig
impl Unpin for PooledTargetConfig
impl UnsafeUnpin for PooledTargetConfig
impl UnwindSafe for PooledTargetConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.