IRollupArchiveLifecycleService
Namespace: Meshmakers.Octo.Runtime.Contracts.StreamData
Rollup-specific lifecycle operations layered on top of IArchiveLifecycleService. Status transitions (Activate / Disable / Enable / RetryActivation / Delete) go through the shared archive lifecycle service since rollups inherit those semantics unchanged (concept §2); this interface only adds the operations that are unique to rollups: freeze / unfreeze and watermark rewind. Backs the GraphQL mutations defined in concept §9.
public interface IRollupArchiveLifecycleService
Methods
CreateAsync(String, OctoObjectId, TimeSpan, TimeSpan, IReadOnlyList<CkRollupAggregationSpec>, BucketAlignment)
Creates a new CkRollupArchive entity in CkArchiveStatus.Created from a
rollup-specific input. The inherited CkArchive attributes TargetCkTypeId (from the
source archive) and Columns (from RollupColumnGenerator.Generate(IReadOnlyList<CkRollupAggregationSpec>)) are
resolved server-side so callers don't have to duplicate the column-derivation rule.
Concept §4. Throws ArchiveNotFoundException if
doesn't resolve.
Task<OctoObjectId> CreateAsync(string rtWellKnownName, OctoObjectId sourceArchiveRtId, TimeSpan bucketSize, TimeSpan watermarkLag, IReadOnlyList<CkRollupAggregationSpec> aggregations, BucketAlignment bucketAlignment)
Parameters
rtWellKnownName String
sourceArchiveRtId OctoObjectId
bucketSize TimeSpan
watermarkLag TimeSpan
aggregations IReadOnlyList<CkRollupAggregationSpec>
bucketAlignment BucketAlignment
Returns
Task<OctoObjectId>
The generated runtime id of the new rollup archive.
FreezeAsync(OctoObjectId, DateTime)
Sets RollupArchiveSnapshot.FrozenUntil to .
Monotonic: rejected when is earlier than the current value
(use IRollupArchiveLifecycleService.UnfreezeAsync(OctoObjectId, Boolean) instead). When set, the orchestrator will not produce new
buckets whose bucketEnd falls within the frozen range; already-aggregated rows in
that range are preserved. Concept §6, §9.
Task FreezeAsync(OctoObjectId rollupRtId, DateTime until)
Parameters
rollupRtId OctoObjectId
until DateTime
Returns
UnfreezeAsync(OctoObjectId, Boolean)
Clears RollupArchiveSnapshot.FrozenUntil. Rejected when source data inside the previously frozen range has been truncated and is false, because unfreezing would produce visible gaps once the orchestrator catches up. The override is intentional so an operator can knowingly accept the inconsistency. Concept §9.
Task UnfreezeAsync(OctoObjectId rollupRtId, bool acceptGaps)
Parameters
rollupRtId OctoObjectId
acceptGaps Boolean
Returns
RewindWatermarkAsync(OctoObjectId, DateTime)
Resets RollupArchiveSnapshot.LastAggregatedBucketEnd to
(truncated to the bucket boundary). Subsequent orchestrator
ticks re-aggregate the rewound range. Destructive: previously committed rows in that range
are temporarily out of sync until the orchestrator catches up. Requires elevated
permission (the GraphQL field enforces the StreamDataAdmin role). Concept §5, §9.
Task RewindWatermarkAsync(OctoObjectId rollupRtId, DateTime toBucketEnd)
Parameters
rollupRtId OctoObjectId
toBucketEnd DateTime