Strongly reads blob-location evidence and records read-path failures.
A failed or corrupt location transition and its durable repair intent are one Concord transaction. Phase 8 will dispatch these outbox events; reads never wait for that background work.
Summary
Functions
Revalidates a prepared cleanup fence immediately before physical deletion.
Removes the local location and releases its GC lock in one transaction.
Removes a draining location only while all supplied retained locations remain checksum-ready and the optional durable-job fence is still live.
Types
@type record() :: %{ key: binary(), location: ExStorageService.Metadata.Models.BlobLocation.t(), mod_revision: non_neg_integer() }
Functions
@spec authorize_cleanup( binary(), binary(), pos_integer(), binary(), binary(), pos_integer(), non_neg_integer(), keyword() ) :: :ok | {:error, term()}
Revalidates a prepared cleanup fence immediately before physical deletion.
The draining location stores the job token and the retained replica/topology
snapshot established by mark_draining/3. This check fails closed if any of
those records changed or the durable job lease is no longer live.
@spec mark_ready(binary(), binary(), pos_integer(), non_neg_integer(), keyword()) :: :ok | {:error, term()}
@spec remove_after_gc(binary(), binary(), pos_integer(), binary(), keyword()) :: :ok | {:error, term()}
Removes the local location and releases its GC lock in one transaction.
Callers must invoke this only after the physical representation was removed successfully. The generation and lock token comparisons prevent an old collector from deleting metadata for newly published bytes.
Removes a draining location only while all supplied retained locations remain checksum-ready and the optional durable-job fence is still live.