Skip to main content

ArchiveStorageStats

Namespace: Meshmakers.Octo.Runtime.Contracts.StreamData

Backend-agnostic snapshot of an archive's underlying storage table — row count, on-disk size, and an overall health classification. Used by the studio's archives list to surface the live state of each archive alongside its CK-side configuration.

public record ArchiveStorageStats : IEquatable<ArchiveStorageStats>

Inheritance ObjectArchiveStorageStats
Implements IEquatable<ArchiveStorageStats>

Remarks:

All values are reported by the data-store provider on demand; they are not cached on the runtime entity. ArchiveStorageStats.TableExists is true when the backing table is provisioned — i.e. the archive has been activated and the DDL has landed. When false, ArchiveStorageStats.RecordCount and ArchiveStorageStats.SizeBytes are both 0 and ArchiveStorageStats.Health is ArchiveStorageHealth.Unknown. Concrete providers may map their native health signal (CrateDB sys.health, future TSDB equivalents) onto ArchiveStorageStats.Health but must not leak backend vocabulary through this contract.

Properties

ArchiveRtId

Runtime id of the archive this snapshot describes.

public OctoObjectId ArchiveRtId { get; set; }

Property Value

OctoObjectId

TableExists

True when the data-store provider sees a backing table for the archive. False when the archive has not been activated yet or the backing table is missing.

public bool TableExists { get; set; }

Property Value

Boolean

RecordCount

Total number of stored rows on the table (primary copies only — replica copies are not counted twice). 0 when ArchiveStorageStats.TableExists is false.

public long RecordCount { get; set; }

Property Value

Int64

SizeBytes

On-disk size of the primary copies, in bytes. 0 when ArchiveStorageStats.TableExists is false. UIs typically format this human-readable (KiB / MiB / GiB).

public long SizeBytes { get; set; }

Property Value

Int64

Health

Overall health classification. ArchiveStorageHealth.Unknown when the provider could not determine a state.

public ArchiveStorageHealth Health { get; set; }

Property Value

ArchiveStorageHealth

Constructors

ArchiveStorageStats(OctoObjectId, Boolean, Int64, Int64, ArchiveStorageHealth)

Backend-agnostic snapshot of an archive's underlying storage table — row count, on-disk size, and an overall health classification. Used by the studio's archives list to surface the live state of each archive alongside its CK-side configuration.

public ArchiveStorageStats(OctoObjectId ArchiveRtId, bool TableExists, long RecordCount, long SizeBytes, ArchiveStorageHealth Health)

Parameters

ArchiveRtId OctoObjectId
Runtime id of the archive this snapshot describes.

TableExists Boolean
True when the data-store provider sees a backing table for the archive. False when the archive has not been activated yet or the backing table is missing.

RecordCount Int64
Total number of stored rows on the table (primary copies only — replica copies are not counted twice). 0 when ArchiveStorageStats.TableExists is false.

SizeBytes Int64
On-disk size of the primary copies, in bytes. 0 when ArchiveStorageStats.TableExists is false. UIs typically format this human-readable (KiB / MiB / GiB).

Health ArchiveStorageHealth
Overall health classification. ArchiveStorageHealth.Unknown when the provider could not determine a state.

Remarks:

All values are reported by the data-store provider on demand; they are not cached on the runtime entity. ArchiveStorageStats.TableExists is true when the backing table is provisioned — i.e. the archive has been activated and the DDL has landed. When false, ArchiveStorageStats.RecordCount and ArchiveStorageStats.SizeBytes are both 0 and ArchiveStorageStats.Health is ArchiveStorageHealth.Unknown. Concrete providers may map their native health signal (CrateDB sys.health, future TSDB equivalents) onto ArchiveStorageStats.Health but must not leak backend vocabulary through this contract.