Zum Hauptinhalt springen

ArchiveRecomputeRange

Namespace: Meshmakers.Octo.Runtime.Contracts.StreamData

Information B of the recompute model: one pending recompute obligation, derived by propagating an ArchiveDirtyWindow through the rollup dependency graph. Identifies a dependent archive and the bucket-aligned half-open range [RangeStart, RangeEnd) to recompute, optionally scoped to a single ArchiveRecomputeRange.RtIdScope (metering point / stream). Maps 1:1 to the CkArchiveRecomputeRange record. All timestamps are UTC.

public record ArchiveRecomputeRange : IEquatable<ArchiveRecomputeRange>

Inheritance Object → ArchiveRecomputeRange
Implements IEquatable<ArchiveRecomputeRange>

Remarks:

ArchiveRecomputeRange.RtIdScope is only populated when an operator triggers a manually scoped recompute of one entity. Ranges derived from the dirty window of a late delivery carry the affected series in ArchiveRecomputeRange.RtIdSet instead; both null means every rtId in the range. The range boundaries are aligned to the dependent's own bucket boundaries, so the recompute orchestrator can process them as whole buckets.

Attempt tracking. A range that fails is kept so a later pass finishes it, but a permanently broken rollup must not consume a recompute run every tick forever. ArchiveRecomputeRange.Attempts counts the failures this obligation has already accumulated, ArchiveRecomputeRange.NextAttemptAt holds it back until the backoff has elapsed, and ArchiveRecomputeRange.LastError carries the reason of the most recent failure. A freshly enqueued range is (0, null, null) — the pre-1.9.0 shape — so ranges stored before the upgrade simply start at attempt zero. Once the attempt cap is reached the obligation is parked (ArchiveRecomputeRange.IsParked): it stays on the entity, visibly, and is never due again until a recompute that covers it succeeds and releases it.

Identity. The record is a value: two obligations are the same only when every field matches, and a store removes an obligation by handing back the very record it read. That is deliberate — an identical range enqueued while a run was in progress (a manual trigger coalesced into the running job) is a newer obligation with a later ArchiveRecomputeRange.EnqueuedAt, and the run that finished cannot have honoured it.

Fields​

ParkedUntil​

The ArchiveRecomputeRange.NextAttemptAt a parked obligation carries: far enough in the future never to be due, and far enough from DateTime.MaxValue to survive a millisecond-resolution store round trip unchanged in meaning. Compared with >=, so a store that truncates it still reads back as parked.

public static DateTime ParkedUntil;

Properties​

DependentArchiveRtId​

public OctoObjectId DependentArchiveRtId { get; set; }

Property Value​

OctoObjectId

RangeStart​

public DateTime RangeStart { get; set; }

Property Value​

DateTime

RangeEnd​

public DateTime RangeEnd { get; set; }

Property Value​

DateTime

RtIdScope​

public Nullable<OctoObjectId> RtIdScope { get; set; }

Property Value​

Nullable<OctoObjectId>

EnqueuedAt​

public DateTime EnqueuedAt { get; set; }

Property Value​

DateTime

Attempts​

public int Attempts { get; set; }

Property Value​

Int32

NextAttemptAt​

public Nullable<DateTime> NextAttemptAt { get; set; }

Property Value​

Nullable<DateTime>

LastError​

public string LastError { get; set; }

Property Value​

String

IsParked​

Whether this obligation has exhausted its attempts and waits, visibly, for the cause to be fixed and a covering recompute to succeed.

public bool IsParked { get; }

Property Value​

Boolean

RtIdSet​

The series a late-delivery obligation is restricted to (System.StreamData 1.26.0), or null. A set-scoped obligation is refreshed in place at the active generation of each bucket instead of being recomputed into a new generation, and is inherited by the chained dependents.

public RtIdSet RtIdSet { get; set; }

Property Value​

RtIdSet

Remarks:

Init-only, not positional, so the positional constructor keeps its signature for a storage layer compiled against the previous contract. Part of the value equality like every other field (RtIdSet compares by its members).

IsDebounced​

Whether this obligation is held back by the late-data debounce rather than by a retry backoff: it has never failed (ArchiveRecomputeRange.Attempts zero) and carries a ArchiveRecomputeRange.NextAttemptAt anyway. The drain releases every debounced obligation of a rollup together as soon as the oldest of them is due, so late deliveries of one interval are computed once.

public bool IsDebounced { get; }

Property Value​

Boolean

Constructors​

ArchiveRecomputeRange(OctoObjectId, DateTime, DateTime, Nullable<OctoObjectId>, DateTime, Int32, Nullable<DateTime>, String)​

Information B of the recompute model: one pending recompute obligation, derived by propagating an ArchiveDirtyWindow through the rollup dependency graph. Identifies a dependent archive and the bucket-aligned half-open range [RangeStart, RangeEnd) to recompute, optionally scoped to a single ArchiveRecomputeRange.RtIdScope (metering point / stream). Maps 1:1 to the CkArchiveRecomputeRange record. All timestamps are UTC.

public ArchiveRecomputeRange(OctoObjectId DependentArchiveRtId, DateTime RangeStart, DateTime RangeEnd, Nullable<OctoObjectId> RtIdScope, DateTime EnqueuedAt, int Attempts, Nullable<DateTime> NextAttemptAt, string LastError)

Parameters​

DependentArchiveRtId OctoObjectId

RangeStart DateTime

RangeEnd DateTime

RtIdScope Nullable<OctoObjectId>

EnqueuedAt DateTime

Attempts Int32

NextAttemptAt Nullable<DateTime>

LastError String

Remarks:

ArchiveRecomputeRange.RtIdScope is only populated when an operator triggers a manually scoped recompute of one entity. Ranges derived from the dirty window of a late delivery carry the affected series in ArchiveRecomputeRange.RtIdSet instead; both null means every rtId in the range. The range boundaries are aligned to the dependent's own bucket boundaries, so the recompute orchestrator can process them as whole buckets.

Attempt tracking. A range that fails is kept so a later pass finishes it, but a permanently broken rollup must not consume a recompute run every tick forever. ArchiveRecomputeRange.Attempts counts the failures this obligation has already accumulated, ArchiveRecomputeRange.NextAttemptAt holds it back until the backoff has elapsed, and ArchiveRecomputeRange.LastError carries the reason of the most recent failure. A freshly enqueued range is (0, null, null) — the pre-1.9.0 shape — so ranges stored before the upgrade simply start at attempt zero. Once the attempt cap is reached the obligation is parked (ArchiveRecomputeRange.IsParked): it stays on the entity, visibly, and is never due again until a recompute that covers it succeeds and releases it.

Identity. The record is a value: two obligations are the same only when every field matches, and a store removes an obligation by handing back the very record it read. That is deliberate — an identical range enqueued while a run was in progress (a manual trigger coalesced into the running job) is a newer obligation with a later ArchiveRecomputeRange.EnqueuedAt, and the run that finished cannot have honoured it.

Methods​

IsDueAt(DateTime)​

Whether the drain may pick this obligation up at now. A range that has never failed (ArchiveRecomputeRange.NextAttemptAtnull) is always due; a parked one never is.

public bool IsDueAt(DateTime now)

Parameters​

now DateTime

Returns​

Boolean

Overlaps(DateTime, DateTime)​

Whether [RangeStart, RangeEnd) and [from, to) share at least one instant.

public bool Overlaps(DateTime from, DateTime to)

Parameters​

from DateTime

to DateTime

Returns​

Boolean

IsContainedIn(DateTime, DateTime)​

Whether [RangeStart, RangeEnd) lies entirely inside [from, to).

public bool IsContainedIn(DateTime from, DateTime to)

Parameters​

from DateTime

to DateTime

Returns​

Boolean