Table of Contents

Class TableProperties

Namespace
RocksDbNet
Assembly
RocksDb.Net.dll

Properties of a single SST table file, as reported by RocksDb. Maps to rocksdb_table_properties_t.

public sealed record TableProperties : IEquatable<TableProperties>
Inheritance
TableProperties
Implements
Inherited Members

Remarks

Instances are eager snapshots. The native rocksdb_table_properties_t has no create or destroy function: it is a view over a field inside the owning event-info object, and is only valid while that object is alive, which for a listener means the duration of the callback. Everything is therefore copied out at construction and this object is safe to keep and to hand to other threads.

Values that RocksDb does not populate for a given file come back as zero or empty rather than as an error.

Properties

ColumnFamilyId

Identifier of the column family this file belongs to.

public ulong ColumnFamilyId { get; init; }

Property Value

ulong

ColumnFamilyName

Name of the column family this file belongs to.

public string? ColumnFamilyName { get; init; }

Property Value

string

ComparatorName

Name of the comparator the keys are ordered by.

public string? ComparatorName { get; init; }

Property Value

string

CompressionName

Name of the compression algorithm used for data blocks.

public string? CompressionName { get; init; }

Property Value

string

CompressionOptions

Compression options in effect, in RocksDb's textual form.

public string? CompressionOptions { get; init; }

Property Value

string

CreationTime

Unix timestamp at which the oldest data in this file was written, or 0 if unknown.

public ulong CreationTime { get; init; }

Property Value

ulong

DataBlockRestartInterval

Restart interval used for data blocks.

public ulong DataBlockRestartInterval { get; init; }

Property Value

ulong

DataSize

Total size of all data blocks, in bytes.

public ulong DataSize { get; init; }

Property Value

ulong

DbHostId

Host identifier of the machine that produced this file.

public string? DbHostId { get; init; }

Property Value

string

DbId

Identifier of the database that produced this file.

public string? DbId { get; init; }

Property Value

string

DbSessionId

Identifier of the database session that produced this file.

public string? DbSessionId { get; init; }

Property Value

string

ExternalSstFileGlobalSeqnoOffset

Offset of the global sequence number for an ingested external file.

public ulong ExternalSstFileGlobalSeqnoOffset { get; init; }

Property Value

ulong

FastCompressionEstimatedDataSize

Estimated data size had the faster compression been used, in bytes.

public ulong FastCompressionEstimatedDataSize { get; init; }

Property Value

ulong

FileCreationTime

Unix timestamp at which this file was created, or 0 if unknown.

public ulong FileCreationTime { get; init; }

Property Value

ulong

FilterPolicyName

Name of the filter policy used, or empty when no filter was written.

public string? FilterPolicyName { get; init; }

Property Value

string

FilterSize

Total size of the filter block, in bytes.

public ulong FilterSize { get; init; }

Property Value

ulong

FixedKeyLen

The fixed key length, or 0 when keys are variable length.

public ulong FixedKeyLen { get; init; }

Property Value

ulong

FormatVersion

The SST format version this file was written with.

public ulong FormatVersion { get; init; }

Property Value

ulong

HasKeyLargestSeqno

Whether KeyLargestSeqno holds a meaningful value.

public bool HasKeyLargestSeqno { get; init; }

Property Value

bool

HasKeySmallestSeqno

Whether KeySmallestSeqno holds a meaningful value.

public bool HasKeySmallestSeqno { get; init; }

Property Value

bool

IndexBlockRestartInterval

Restart interval used for index blocks.

public ulong IndexBlockRestartInterval { get; init; }

Property Value

ulong

IndexKeyIsUserKey

Whether index keys are user keys rather than internal keys.

public bool IndexKeyIsUserKey { get; init; }

Property Value

bool

IndexPartitions

Number of index partitions, for a partitioned index.

public ulong IndexPartitions { get; init; }

Property Value

ulong

IndexSize

Total size of the index block, in bytes.

public ulong IndexSize { get; init; }

Property Value

ulong

IndexValueIsDeltaEncoded

Whether index values are delta encoded.

public bool IndexValueIsDeltaEncoded { get; init; }

Property Value

bool

KeyLargestSeqno

The largest sequence number in the file. Only meaningful when HasKeyLargestSeqno is true.

public ulong KeyLargestSeqno { get; init; }

Property Value

ulong

KeySmallestSeqno

The smallest sequence number in the file. Only meaningful when HasKeySmallestSeqno is true.

public ulong KeySmallestSeqno { get; init; }

Property Value

ulong

MergeOperatorName

Name of the merge operator, or empty when none was configured.

public string? MergeOperatorName { get; init; }

Property Value

string

NewestKeyTime

Unix timestamp of the newest key in this file, or 0 if unknown.

public ulong NewestKeyTime { get; init; }

Property Value

ulong

NumDataBlocks

Number of data blocks in the file.

public ulong NumDataBlocks { get; init; }

Property Value

ulong

NumDataBlocksCompressionBypassed

Number of data blocks for which compression was skipped entirely.

public ulong NumDataBlocksCompressionBypassed { get; init; }

Property Value

ulong

NumDataBlocksCompressionRejected

Number of data blocks whose compressed form was rejected as not worthwhile.

public ulong NumDataBlocksCompressionRejected { get; init; }

Property Value

ulong

NumDeletions

Number of deletion entries (tombstones) in the file.

public ulong NumDeletions { get; init; }

Property Value

ulong

NumEntries

Number of entries in the file, including deletions and merge operands.

public ulong NumEntries { get; init; }

Property Value

ulong

NumFilterEntries

Number of entries added to the filter.

public ulong NumFilterEntries { get; init; }

Property Value

ulong

NumMergeOperands

Number of merge operands in the file.

public ulong NumMergeOperands { get; init; }

Property Value

ulong

NumRangeDeletions

Number of range-deletion entries in the file.

public ulong NumRangeDeletions { get; init; }

Property Value

ulong

NumUniformBlocks

Number of blocks holding uniformly sized entries.

public ulong NumUniformBlocks { get; init; }

Property Value

ulong

OldestKeyTime

Unix timestamp of the oldest key in this file, or 0 if unknown.

public ulong OldestKeyTime { get; init; }

Property Value

ulong

OrigFileNumber

The file number of the original SST file, or 0 if unknown.

public ulong OrigFileNumber { get; init; }

Property Value

ulong

PrefixExtractorName

Name of the prefix extractor, or empty when none was configured.

public string? PrefixExtractorName { get; init; }

Property Value

string

PropertyCollectorsNames

Names of the table-properties collectors that ran, as reported by RocksDb.

public string? PropertyCollectorsNames { get; init; }

Property Value

string

RawKeySize

Total size of all keys before compression or encoding, in bytes.

public ulong RawKeySize { get; init; }

Property Value

ulong

RawValueSize

Total size of all values before compression or encoding, in bytes.

public ulong RawValueSize { get; init; }

Property Value

ulong

ReadableProperties

Always empty.

public IReadOnlyDictionary<string, string> ReadableProperties { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Remarks

RocksDb fills this from table-properties collectors registered by the application, and the C API offers no way to create a collector factory, so nothing ever registers one. It is kept because it is part of the native structure this mirrors. The entries RocksDb contributes itself arrive in UserCollectedProperties, which is populated.

SeparateKeyValueInDataBlock

Whether keys and values are stored separately within data blocks.

public bool SeparateKeyValueInDataBlock { get; init; }

Property Value

bool

SeqnoToTimeMapping

Encoded mapping from sequence numbers to write times. Exposed as raw bytes because the encoding is internal to RocksDb.

public byte[] SeqnoToTimeMapping { get; init; }

Property Value

byte[]

SlowCompressionEstimatedDataSize

Estimated data size had the slower compression been used, in bytes.

public ulong SlowCompressionEstimatedDataSize { get; init; }

Property Value

ulong

TailStartOffset

Offset at which the file's metadata tail begins, in bytes.

public ulong TailStartOffset { get; init; }

Property Value

ulong

TopLevelIndexSize

Size of the top-level index, in bytes, for a partitioned index.

public ulong TopLevelIndexSize { get; init; }

Property Value

ulong

UdiIsPrimaryIndex

Whether a user-defined index is the primary index for this file.

public bool UdiIsPrimaryIndex { get; init; }

Property Value

bool

UncompressedDataSize

Total uncompressed size of all data blocks, in bytes.

public ulong UncompressedDataSize { get; init; }

Property Value

ulong

UserCollectedProperties

Properties written by table-properties collectors, keyed by collector-defined name. Values are raw bytes, since collectors may store binary data. RocksDb contributes some entries of its own.

public IReadOnlyDictionary<string, byte[]> UserCollectedProperties { get; init; }

Property Value

IReadOnlyDictionary<string, byte[]>

UserDefinedTimestampsPersisted

Whether user-defined timestamps are persisted in this file.

public bool UserDefinedTimestampsPersisted { get; init; }

Property Value

bool