Skip to main content

is_eligible

Function is_eligible 

Source
pub fn is_eligible(
    state: &WorkItemState,
    min_age_days: u32,
    now_us: i64,
) -> bool
Expand description

Check if a work item is eligible for compaction.

An item is eligible if:

  • Its lifecycle state is Done or Archived
  • It has been in that terminal state for at least min_age_days
  • It is not soft-deleted (deleted items are already lightweight)

ยงArguments

  • state โ€” The current CRDT state of the item.
  • min_age_days โ€” Minimum days in done/archived before compaction.
  • now_us โ€” Current wall-clock time in microseconds.