pub enum MetadataCompactionLeaseStatus {
Active,
Reaping,
}Expand description
Lifecycle of a compaction lease: two states and one transition.
A lease is created active by the job that owns the prefix. Garbage
collection moves it to reaping by compare-and-swap once it has expired,
and that transition is the fence: the worker’s next heartbeat
compare-and-swap fails, so it can never publish, and only then may the
collector treat the prefix as orphaned. reaping is terminal — nothing
returns a lease to active, and the collector deletes the object once the
prefix’s unreferenced segments are gone.
Variants§
Active
The job owns its prefix. Whether it is still running is a question
about heartbeat_at_ms, not about this field.
Reaping
Terminal: garbage collection claimed the prefix, so the job that wrote it is fenced and the objects under it are orphans.
Trait Implementations§
Source§impl Clone for MetadataCompactionLeaseStatus
impl Clone for MetadataCompactionLeaseStatus
Source§fn clone(&self) -> MetadataCompactionLeaseStatus
fn clone(&self) -> MetadataCompactionLeaseStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more