pub struct EpochParameters {
pub min_duration: Option<String>,
pub refresh_frequency: Option<String>,
pub advance_on_count: Option<i64>,
pub advance_on_size_mb: Option<i64>,
pub checkpoint_frequency: Option<i64>,
pub delete_parallelism: Option<i64>,
}Expand description
kopia epoch-manager parameters. Absent fields are left at whatever the repository already has (kopia’s defaults, noted per field).
An epoch may only advance once it is older than minDuration AND has accumulated
advanceOnCount blobs or advanceOnSizeMB of index data. minDuration is a floor, so
kopia’s 24h default means a busy fleet — say 17 hourly policies at ~60 index blobs/hour
— is forced to ~1700 blobs before an epoch may close, and kopia only compacts two epochs
behind. The repository then permanently carries thousands of uncompacted index blobs,
tripping IndexBlobHealth and slowing every mover’s connect. Lowering minDuration is
the lever for that (#258).
cleanupSafetyMargin is deliberately observable but not settable: its job is to stop
kopia deleting index blobs a concurrent writer still needs, and there is no safe generic
advice for lowering it.
Every field here has an admission floor (#458), because kopia repository set-parameters merges the flags it is given into the repository’s existing parameters and
then validates the whole resulting set — so ONE out-of-range value refuses the entire
call and discards every other parameter in the same apply. The floors:
minDuration: at least10m, and at least 3xrefreshFrequency(kopia’s untouched20mdefault when none is declared — which is whyminDuration: 10malone is rejected, and60mis the smallest value that stands on its own).refreshFrequency: at most80m, because kopia needscleanupSafetyMarginto be at least 3x it and the margin is stuck at kopia’s4hdefault (kopiur cannot set it).advanceOnCount: at least10.advanceOnSizeMiB: at least1.checkpointFrequency: at least1.deleteParallelism: at least1.
Fields§
§min_duration: Option<String>Minimum epoch age before it may advance (kopia default 24h). A Go-style duration
(6h, 90m). The advance gate — no blob count closes an epoch younger than this.
Must be at least 10m (kopia’s absolute floor) AND at least 3x refreshFrequency.
When refreshFrequency is not declared, that second bound is measured against
kopia’s untouched 20m default, so 10m on its own is rejected: use 60m, or
declare a refreshFrequency of a third of it or less alongside it.
refresh_frequency: Option<String>How often clients re-read epoch state (kopia default 20m). Go-style duration.
At most 80m: kopia requires cleanupSafetyMargin >= 3x this value, and
cleanupSafetyMargin is observable-but-not-settable here, so it stays at kopia’s
4h default and 4h / 3 is a hard ceiling.
advance_on_count: Option<i64>Index blobs in an epoch that trigger an advance, once older than minDuration
(kopia default 20).
At least 10 — kopia refuses anything lower with “epoch advance on count too low”.
advance_on_size_mb: Option<i64>Total index size in an epoch that triggers an advance, once older than minDuration
(kopia default 10 MiB).
At least 1 — kopia refuses anything lower with “epoch advance on size too low”,
and 1 MiB is the smallest threshold the flag can express.
Named MiB, not MB, with an explicit rename rather than the derived camelCase
(advanceOnSizeMb, which reads as megabit). The unit is genuinely mebibytes —
kopia’s --epoch-advance-on-size-mb multiplies by 1048576, so 10 is 10485760
bytes — even though kopia’s own log renders the result as “MB”. That ambiguity is
this field’s main hazard; the API surface should not reproduce it.
checkpoint_frequency: Option<i64>Epochs between full index checkpoints (kopia default 7).
At least 1 — kopia refuses anything lower with “invalid epoch range compaction
period”.
delete_parallelism: Option<i64>Parallelism for epoch cleanup deletions (kopia default 4).
At least 1. This floor is kopiur’s own: kopia does not validate the field, so a
non-positive value would ask it to run epoch cleanup with no workers.
Trait Implementations§
Source§impl Clone for EpochParameters
impl Clone for EpochParameters
Source§fn clone(&self) -> EpochParameters
fn clone(&self) -> EpochParameters
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EpochParameters
impl Debug for EpochParameters
Source§impl Default for EpochParameters
impl Default for EpochParameters
Source§fn default() -> EpochParameters
fn default() -> EpochParameters
Source§impl<'de> Deserialize<'de> for EpochParameters
impl<'de> Deserialize<'de> for EpochParameters
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 EpochParameters
Source§impl JsonSchema for EpochParameters
impl JsonSchema for EpochParameters
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 EpochParameters
impl PartialEq for EpochParameters
Source§fn eq(&self, other: &EpochParameters) -> bool
fn eq(&self, other: &EpochParameters) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for EpochParameters
impl Serialize for EpochParameters
impl StructuralPartialEq for EpochParameters
Auto Trait Implementations§
impl Freeze for EpochParameters
impl RefUnwindSafe for EpochParameters
impl Send for EpochParameters
impl Sync for EpochParameters
impl Unpin for EpochParameters
impl UnsafeUnpin for EpochParameters
impl UnwindSafe for EpochParameters
Blanket Implementations§
§impl<T> AnyExt for T
impl<T> AnyExt for T
§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind reference§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable reference§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointer§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointer§fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
T behind Box pointer§fn downcast_move<T>(this: Self) -> Option<T>
fn downcast_move<T>(this: Self) -> Option<T>
Self to T,
useful only in generic context as a workaround for specializationSource§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more