Skip to main content

IArchiveRecomputeExecutor

Namespace: Meshmakers.Octo.Runtime.Contracts.StreamData

Performs the actual recompute of a rollup over a bucket-aligned range (AB#4184): aggregate the source archive into a per-job staging table and commit it atomically (full-archive SWAP TABLE or per-window generation-pointer flip), so readers never observe a partial state. The orchestrator owns the job lifecycle, coalescing, observability, and dependency propagation; this interface owns only the storage-level compute + swap. The CrateDB implementation lands in Phase 3c.

public interface IArchiveRecomputeExecutor

Methods

ExecuteAsync(ArchiveSnapshot, RollupArchiveSnapshot, DateTime, DateTime, Nullable<OctoObjectId>, CancellationToken)

Recomputes for the half-open range [rangeStart, rangeEnd) (optionally restricted to ) by aggregating into staging and swapping atomically on success. Throws if the compute or swap fails — leaving the previous committed state intact — so the orchestrator can mark the job RecomputeJobState.Failed.

Task<RecomputeExecutionResult> ExecuteAsync(ArchiveSnapshot source, RollupArchiveSnapshot rollup, DateTime rangeStart, DateTime rangeEnd, Nullable<OctoObjectId> rtIdScope, CancellationToken cancellationToken)

Parameters

source ArchiveSnapshot

rollup RollupArchiveSnapshot

rangeStart DateTime

rangeEnd DateTime

rtIdScope Nullable<OctoObjectId>

cancellationToken CancellationToken

Returns

Task<RecomputeExecutionResult>