Zum Hauptinhalt springen

ArchiveRecomputeRange

Namespace: Meshmakers.Octo.Runtime.Contracts.StreamData

Information B of the recompute model (AB#4184): 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 null for ranges derived from dirty-window propagation (which is window- not rtId-granular); it is only populated when an operator triggers a manually scoped recompute. The range boundaries are aligned to the dependent's own bucket boundaries, so the recompute orchestrator can process them as whole buckets.

Attempt tracking (AB#5189). 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 (AB#5189): 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 (AB#5189).

public bool IsParked { get; }

Property Value​

Boolean

Constructors​

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

Information B of the recompute model (AB#4184): 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 null for ranges derived from dirty-window propagation (which is window- not rtId-granular); it is only populated when an operator triggers a manually scoped recompute. The range boundaries are aligned to the dependent's own bucket boundaries, so the recompute orchestrator can process them as whole buckets.

Attempt tracking (AB#5189). 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