pub struct MaintenanceRun {
pub start: Option<DateTime<Utc>>,
pub end: Option<DateTime<Utc>>,
pub success: bool,
pub error: String,
pub extra: Vec<MaintenanceRunExtra>,
}Expand description
One entry in a per-task maintenance run history (schedule.runs[task][]).
Mirrors kopia’s maintenance.RunInfo. Two serialization details are
load-bearing:
successisjson:"success,omitempty", so a failed run serializes with the key absent.#[serde(default)]therefore decodes a failed run assuccess: false— the same value kopia meant.extrais populated only on success, so a failed run contributes no statistics at all.
start/end carry no omitempty in kopia today, but are modelled as
Option anyway: this history feeds a best-effort metric, and it must
never be the reason a maintenance info — which the mover’s lease decision
depends on — fails to parse.
Fields§
§start: Option<DateTime<Utc>>When the run started. The only sound key for a before/after comparison
(see MaintenanceSchedule::runs on why index and length are not).
end: Option<DateTime<Utc>>When the run finished.
success: boolWhether the run succeeded. Absent on the wire means false.
error: Stringkopia’s failure text, empty on success.
extra: Vec<MaintenanceRunExtra>Per-task statistics blocks; populated only on success.
Implementations§
Source§impl MaintenanceRun
impl MaintenanceRun
Sourcepub fn delete_unreferenced_packs_stats(
&self,
) -> Option<DeleteUnreferencedPacksStats>
pub fn delete_unreferenced_packs_stats( &self, ) -> Option<DeleteUnreferencedPacksStats>
Blobs deleted because no index referenced them — the one statistic that reports storage genuinely freed from the backend.
Sourcepub fn cleanup_superseded_indexes_stats(
&self,
) -> Option<CleanupSupersededIndexesStats>
pub fn cleanup_superseded_indexes_stats( &self, ) -> Option<CleanupSupersededIndexesStats>
Index blobs deleted after epoch compaction superseded them.
Sourcepub fn cleanup_logs_stats(&self) -> Option<CleanupLogsStats>
pub fn cleanup_logs_stats(&self) -> Option<CleanupLogsStats>
Repository log blobs deleted per logRetention.
Trait Implementations§
Source§impl Clone for MaintenanceRun
impl Clone for MaintenanceRun
Source§fn clone(&self) -> MaintenanceRun
fn clone(&self) -> MaintenanceRun
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 MaintenanceRun
impl Debug for MaintenanceRun
Source§impl Default for MaintenanceRun
impl Default for MaintenanceRun
Source§fn default() -> MaintenanceRun
fn default() -> MaintenanceRun
Source§impl<'de> Deserialize<'de> for MaintenanceRun
impl<'de> Deserialize<'de> for MaintenanceRun
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>,
Source§impl PartialEq for MaintenanceRun
impl PartialEq for MaintenanceRun
Source§fn eq(&self, other: &MaintenanceRun) -> bool
fn eq(&self, other: &MaintenanceRun) -> bool
self and other values to be equal, and is used by ==.