#[non_exhaustive]pub struct ReclaimGrant {
pub execution_id: ExecutionId,
pub partition_key: PartitionKey,
pub grant_key: String,
pub expires_at_ms: u64,
pub lane_id: LaneId,
}Expand description
A lease-reclaim grant issued for an execution in
lease_expired_reclaimable or lease_revoked state (RFC-024 §3.1).
Distinct from ResumeGrant: the reclaim grant routes to
ff_reclaim_execution (Valkey) / the new-attempt reclaim impl
(PG/SQLite), which creates a NEW attempt row and bumps the
execution’s lease_reclaim_count. The resume grant, by contrast,
re-uses the existing attempt under ff_claim_resumed_execution.
Carries lane_id for symmetry with ResumeGrant — the Lua
ff_reclaim_execution needs the lane for key construction, and
the consuming worker would otherwise pay a round-trip to recover
it from exec_core.
Backend impl bodies ship under PR-D (PG) / PR-E (SQLite) / PR-F
(Valkey). This PR lands only the type + trait surface; default
crate::engine_backend::EngineBackend::issue_reclaim_grant and
crate::engine_backend::EngineBackend::reclaim_execution return
crate::engine_error::EngineError::Unavailable until each
backend PR wires its real body.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.execution_id: ExecutionIdThe execution granted for lease-reclaim.
partition_key: PartitionKeyOpaque partition handle for this execution’s hash-tag slot.
grant_key: StringBackend-scoped grant key (Valkey key / PG+SQLite
ff_claim_grant.grant_id).
expires_at_ms: u64Monotonic ms when the grant expires; unconsumed grants vanish.
lane_id: LaneIdLane the execution belongs to — needed by
ff_reclaim_execution for KEYS[*] construction.
Implementations§
Source§impl ReclaimGrant
impl ReclaimGrant
Sourcepub fn new(
execution_id: ExecutionId,
partition_key: PartitionKey,
grant_key: String,
expires_at_ms: u64,
lane_id: LaneId,
) -> Self
pub fn new( execution_id: ExecutionId, partition_key: PartitionKey, grant_key: String, expires_at_ms: u64, lane_id: LaneId, ) -> Self
Construct a reclaim grant. Added alongside #[non_exhaustive]
per RFC-024 §3.1 + feedback_non_exhaustive_needs_constructor.
Sourcepub fn partition(&self) -> Result<Partition, PartitionKeyParseError>
pub fn partition(&self) -> Result<Partition, PartitionKeyParseError>
Parse partition_key into a typed
crate::partition::Partition.
Trait Implementations§
Source§impl Clone for ReclaimGrant
impl Clone for ReclaimGrant
Source§fn clone(&self) -> ReclaimGrant
fn clone(&self) -> ReclaimGrant
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more