Table of Contents

Class TimeoutOptions

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Configuration options for lock acquisition timeouts across all engine subsystems.

public class TimeoutOptions
Inheritance
TimeoutOptions
Inherited Members

Remarks

Each subsystem has its own timeout property, allowing fine-grained tuning based on expected contention patterns. All defaults are 5 seconds except for TransactionChainLockTimeout and SegmentAllocationLockTimeout which default to 10 seconds due to higher expected contention during heavy write workloads.

When a lock acquisition exceeds its timeout, the caller throws LockTimeoutException with the resource name and elapsed duration for diagnostics.

Constructors

TimeoutOptions()

public TimeoutOptions()

Properties

BTreeLockTimeout

Timeout for B+Tree index locks during insert, delete, and lookup operations.

public TimeSpan BTreeLockTimeout { get; set; }

Property Value

TimeSpan

CommitPublishBackpressureTimeout

How long a commit's publish may wait out page-cache back-pressure, from the moment its records are in the WAL, before giving up and stopping the engine (AP-03).

public TimeSpan CommitPublishBackpressureTimeout { get; set; }

Property Value

TimeSpan

Remarks

Past the append a commit cannot roll back: an allocation that gave up after PageCacheBackpressureTimeout would leave a partial publish, which stops the engine until a reopen recovers the commit from the log. The publish waits instead, logging each PageCacheBackpressureTimeout it outlasts. One bound for the whole publish, however many allocations it makes. It is far above any checkpoint stall, and still makes a cache that cannot free a page — every page held by the epochs of running transactions, the publisher's own among them — stop the engine instead of hanging it.

Current

The singleton instance set by DatabaseEngine during initialization. Accessible from any subsystem without requiring a reference to the engine.

public static TimeoutOptions Current { get; }

Property Value

TimeoutOptions

DefaultCommitTimeout

Default timeout for Commit(ConcurrencyConflictHandler) when called without an explicit UnitOfWorkContext. Individual lock timeouts (5-10s) provide tighter bounds within this limit.

public TimeSpan DefaultCommitTimeout { get; set; }

Property Value

TimeSpan

DefaultLockTimeout

Default lock timeout used when no subsystem-specific timeout applies.

public TimeSpan DefaultLockTimeout { get; set; }

Property Value

TimeSpan

DefaultUowTimeout

Default lifetime timeout for a Unit of Work when none is specified at creation. Individual lock timeouts (5-10s) provide tighter bounds within this limit.

public TimeSpan DefaultUowTimeout { get; set; }

Property Value

TimeSpan

PageCacheBackpressureTimeout

Timeout for page cache back-pressure waits. When all cache pages are dirty or epoch-protected, allocation threads wait for IO completion to make pages evictable.

public TimeSpan PageCacheBackpressureTimeout { get; set; }

Property Value

TimeSpan

PageCacheLockTimeout

Timeout for page cache state-transition locks in PagedMMF and ManagedPagedMMF.

public TimeSpan PageCacheLockTimeout { get; set; }

Property Value

TimeSpan

PageCacheOverloadWaitCeiling

How long a page allocation waits on back-pressure, in all, while the cache keeps serving other allocations (#1382, S1 of the starvation policy). Past PageCacheBackpressureTimeout a wait goes on, a fresh timeout at a time, as long as pages were served since its last one: the engine is slow, not stuck, and the work goes through. A wait that sees no page served for a whole timeout, or reaches this ceiling, throws PageCacheBackpressureTimeoutException. The storage health state (StorageHealthState) reports such waits.

public TimeSpan PageCacheOverloadWaitCeiling { get; set; }

Property Value

TimeSpan

RevisionChainLockTimeout

Timeout for revision chain locks during MVCC revision read, add, and cleanup operations.

public TimeSpan RevisionChainLockTimeout { get; set; }

Property Value

TimeSpan

SegmentAllocationLockTimeout

Timeout for segment allocation locks in chained block allocators and variable-sized buffer segments.

public TimeSpan SegmentAllocationLockTimeout { get; set; }

Property Value

TimeSpan

Remarks

Defaults to 10 seconds because segment allocation may trigger page-level operations under the hood.

TransactionChainLockTimeout

Timeout for transaction chain locks during create, remove, and walk operations.

public TimeSpan TransactionChainLockTimeout { get; set; }

Property Value

TimeSpan

Remarks

Defaults to 10 seconds because transaction chain operations can involve heavier contention under high-throughput write workloads.

WalBackPressureTimeout

Timeout for WAL commit buffer back-pressure waits. When the ring buffer is full, commit threads spin-wait for the WAL writer to drain it.

public TimeSpan WalBackPressureTimeout { get; set; }

Property Value

TimeSpan