Zum Hauptinhalt springen

RecomputeJobSnapshot

Namespace: Meshmakers.Octo.Runtime.Contracts.StreamData

Read/write snapshot of a RecomputeJob entity — the persistent history record of one recompute run, carrying enough context to debug a failed recompute after the fact. Stores translate between this record and their concrete entity representation. All timestamps are UTC.

public record RecomputeJobSnapshot : IEquatable<RecomputeJobSnapshot>

Inheritance Object → RecomputeJobSnapshot
Implements IEquatable<RecomputeJobSnapshot>

Fields​

ComputedColumnMarkerPrefix​

Prefix of RecomputeJobSnapshot.StagingTableName that marks a computed-column backfill job. A computed-column backfill has no staging table; its target is the hidden physical column the backfill writes before the column is switched on. The marker lets such a job live in the same RecomputeJob history as the rollup recomputes — so it shows up in the recompute-jobs query — without a model change, and keeps the rollup orchestrator from adopting it.

public static string ComputedColumnMarkerPrefix;

ComputedColumnRepairMarker​

Follows RecomputeJobSnapshot.ComputedColumnMarkerPrefix in the marker of a computed-column repair job : computed-column:repair:<column>. Column names never contain a colon, so the marker is unambiguous; a repair job counts as a computed-column job everywhere (rollup orchestrator, recompute-jobs query) and reports its column in RecomputeJobSnapshot.ComputedColumnName.

public static string ComputedColumnRepairMarker;

Properties​

RtId​

Runtime id of the job entity. for a not-yet-persisted job that IRecomputeJobStore.CreateAsync(RecomputeJobSnapshot) is about to assign an id to.

public OctoObjectId RtId { get; set; }

Property Value​

OctoObjectId

ArchiveRtId​

The archive this job recomputed.

public OctoObjectId ArchiveRtId { get; set; }

Property Value​

OctoObjectId

State​

Current lifecycle state.

public RecomputeJobState State { get; set; }

Property Value​

RecomputeJobState

Trigger​

What initiated the run.

public RecomputeTrigger Trigger { get; set; }

Property Value​

RecomputeTrigger

RangeStart​

Inclusive start of the recomputed range.

public DateTime RangeStart { get; set; }

Property Value​

DateTime

RangeEnd​

Exclusive end of the recomputed range.

public DateTime RangeEnd { get; set; }

Property Value​

DateTime

RtIdScope​

Optional single rtId the run was scoped to; null means all rtIds.

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

Property Value​

Nullable<OctoObjectId>

RowsProcessed​

Rows written into the staging table; null until known.

public Nullable<int> RowsProcessed { get; set; }

Property Value​

Nullable<Int32>

WindowsProcessed​

Buckets recomputed; null until known.

public Nullable<int> WindowsProcessed { get; set; }

Property Value​

Nullable<Int32>

StartedAt​

When compute started; null while pending.

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

Property Value​

Nullable<DateTime>

FinishedAt​

When the job reached a terminal state; null while running.

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

Property Value​

Nullable<DateTime>

DurationMs​

Wall-clock duration in ms; null while running.

public Nullable<int> DurationMs { get; set; }

Property Value​

Nullable<Int32>

ErrorReason​

Failure reason when RecomputeJobSnapshot.State is Failed; null otherwise.

public string ErrorReason { get; set; }

Property Value​

String

StagingTableName​

Per-job staging table name, for post-mortem; null once swept.

public string StagingTableName { get; set; }

Property Value​

String

LastProgressAt​

Heartbeat: stamped when the job is created or starts computing and again after every committed chunk. A non-terminal job whose heartbeat is older than the orchestrator's stale-job timeout belongs to a process that died; the drain fails it and carries on with its queued work. null on jobs written before the field existed.

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

Property Value​

Nullable<DateTime>

RtIdSet​

The series a late-delivery job refreshed in place (System.StreamData 1.26.0); null for every other job. Init-only so the positional constructor keeps its signature.

public RtIdSet RtIdSet { get; set; }

Property Value​

RtIdSet

ComputedColumnName​

The computed column a backfill or repair job works on, or null for a rollup recompute job.

public string ComputedColumnName { get; }

Property Value​

String

IsComputedColumnBackfill​

Whether this job is a computed-column job (backfill or repair) rather than a rollup recompute.

public bool IsComputedColumnBackfill { get; }

Property Value​

Boolean

IsComputedColumnRepair​

Whether this job repairs NULL cells of an active computed column.

public bool IsComputedColumnRepair { get; }

Property Value​

Boolean

IsActive​

Whether the job is still waiting or running (Pending / Running / Swapping).

public bool IsActive { get; }

Property Value​

Boolean

Constructors​

RecomputeJobSnapshot(OctoObjectId, OctoObjectId, RecomputeJobState, RecomputeTrigger, DateTime, DateTime, Nullable<OctoObjectId>, Nullable<Int32>, Nullable<Int32>, Nullable<DateTime>, Nullable<DateTime>, Nullable<Int32>, String, String, Nullable<DateTime>)​

Read/write snapshot of a RecomputeJob entity — the persistent history record of one recompute run, carrying enough context to debug a failed recompute after the fact. Stores translate between this record and their concrete entity representation. All timestamps are UTC.

public RecomputeJobSnapshot(OctoObjectId RtId, OctoObjectId ArchiveRtId, RecomputeJobState State, RecomputeTrigger Trigger, DateTime RangeStart, DateTime RangeEnd, Nullable<OctoObjectId> RtIdScope, Nullable<int> RowsProcessed, Nullable<int> WindowsProcessed, Nullable<DateTime> StartedAt, Nullable<DateTime> FinishedAt, Nullable<int> DurationMs, string ErrorReason, string StagingTableName, Nullable<DateTime> LastProgressAt)

Parameters​

RtId OctoObjectId
Runtime id of the job entity. for a not-yet-persisted job that IRecomputeJobStore.CreateAsync(RecomputeJobSnapshot) is about to assign an id to.

ArchiveRtId OctoObjectId
The archive this job recomputed.

State RecomputeJobState
Current lifecycle state.

Trigger RecomputeTrigger
What initiated the run.

RangeStart DateTime
Inclusive start of the recomputed range.

RangeEnd DateTime
Exclusive end of the recomputed range.

RtIdScope Nullable<OctoObjectId>
Optional single rtId the run was scoped to; null means all rtIds.

RowsProcessed Nullable<Int32>
Rows written into the staging table; null until known.

WindowsProcessed Nullable<Int32>
Buckets recomputed; null until known.

StartedAt Nullable<DateTime>
When compute started; null while pending.

FinishedAt Nullable<DateTime>
When the job reached a terminal state; null while running.

DurationMs Nullable<Int32>
Wall-clock duration in ms; null while running.

ErrorReason String
Failure reason when RecomputeJobSnapshot.State is Failed; null otherwise.

StagingTableName String
Per-job staging table name, for post-mortem; null once swept.

LastProgressAt Nullable<DateTime>
Heartbeat: stamped when the job is created or starts computing and again after every committed chunk. A non-terminal job whose heartbeat is older than the orchestrator's stale-job timeout belongs to a process that died; the drain fails it and carries on with its queued work. null on jobs written before the field existed.

Methods​

ForComputedColumn(OctoObjectId, String, RecomputeJobState, RecomputeTrigger, DateTime)​

A new, not yet persisted computed-column backfill job. The range is [UnixEpoch, createdAt): the backfill covers every row the archive held when it was queued. While the job runs, RecomputeJobSnapshot.RangeStart advances to the backfill's checkpoint (the end of the last completed time slice), so a run cut short by a restart resumes there instead of starting over.

public static RecomputeJobSnapshot ForComputedColumn(OctoObjectId archiveRtId, string columnName, RecomputeJobState state, RecomputeTrigger trigger, DateTime createdAt)

Parameters​

archiveRtId OctoObjectId

columnName String

state RecomputeJobState

trigger RecomputeTrigger

createdAt DateTime

Returns​

RecomputeJobSnapshot

ForComputedColumnRepair(OctoObjectId, String, DateTime, DateTime, RecomputeTrigger, DateTime)​

A new, not yet persisted computed-column repair job over [from, to). While the job runs, RecomputeJobSnapshot.RangeStart advances to the repair's checkpoint like a backfill's.

public static RecomputeJobSnapshot ForComputedColumnRepair(OctoObjectId archiveRtId, string columnName, DateTime from, DateTime to, RecomputeTrigger trigger, DateTime createdAt)

Parameters​

archiveRtId OctoObjectId

columnName String

from DateTime

to DateTime

trigger RecomputeTrigger

createdAt DateTime

Returns​

RecomputeJobSnapshot