Skip to main content

PooledTargetConfig

Struct PooledTargetConfig 

Source
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: bool

Whether per-key pooled target dirs are used for remote builds.

§reaper_enabled: bool

Whether the stale-target reaper runs (ships off pending canary soak).

§reaper_idle_hours: u32

Idle window before a pooled target dir is reaped (hours).

§reaper_interval_mins: u64

Sweep cadence for the stale reaper (minutes).

§remote_base: String

Remote base under which pooled target dirs live.

§reaper_pooled_idle_hours: u32

LONG 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: u32

Per-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: u32

Idle 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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PooledTargetConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PooledTargetConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for PooledTargetConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for PooledTargetConfig

Source§

impl JsonSchema for PooledTargetConfig

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for PooledTargetConfig

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for PooledTargetConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PooledTargetConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more