Skip to content

Configuration Reference ​

DataVoConfig configures every aspect of an embedded DataVoContext. Most applications only set StorageMode, DiskStoragePath, and LsmStrictFsync; every other property ships with sensible defaults.

csharp
using DataVo.Core;
using DataVo.Core.StorageEngine.Config;

using var db = new DataVoContext(new DataVoConfig
{
    StorageMode = StorageMode.Lsm,
    DiskStoragePath = "./game_data",
    LsmStrictFsync = true
});

Storage & Durability ​

PropertyDefaultDescription
StorageModeStorageMode.InMemoryStorage backend: InMemory, Lsm, Disk (legacy), Wasm (browser playground), or Custom.
DiskStoragePathnullDirectory for persisted Lsm and Disk files. Guarded by a single-process datavo.lock.
CustomStorageEnginenullCustom IStorageEngine instance when StorageMode = StorageMode.Custom.
WasmStorageEnginenullBrowser storage engine when StorageMode = StorageMode.Wasm.
LockAcquireTimeoutMs30000Maximum milliseconds to wait for a lock before failing (-1 waits indefinitely).
WalEnabledtrue (Disk), false (other)Enables WAL in legacy Disk mode.
SyncDiskWritesfalseForces fsync on legacy Disk mode writes.
WalFilePath"datavo.wal"Legacy Disk WAL file name or path.
WalCheckpointThreshold1000Legacy Disk WAL entry threshold before checkpointing.
WalCheckpointIntervalMs1000Background WAL checkpoint interval (ms) for IoSchedulerMode.GroupCommit.
TransactionIdStateFilePath"datavo.txid"Persisted MVCC transaction ID watermark file.
CheckpointStateFilePath"datavo.ckpt"Persisted binary WAL checkpoint LSN watermark file.

LSM & I/O ​

PropertyDefaultDescription
LsmStrictFsynctruetrue flushes the LSM commit log to stable storage before acknowledging writes; false (Relaxed) acknowledges in OS page cache.
LsmReadModeLsmReadMode.AutoAuto memory-maps SSTables on 64-bit platforms; PositionalRead uses standard file reads.
ClusteredPrimaryKeystrueStores new LSM tables with single-column INT or GUID primary keys clustered under that key.
IoSchedulerModeIoSchedulerMode.OffDisk I/O scheduler mode (Off, pooled positioned I/O, or GroupCommit).
EnableZeroAllocCompiledUpdatetrueAllows eligible fixed-width single-row compiled UPDATEs to byte-patch stored rows in place.

The LSM MemTable flush threshold (32 MB) is an internal engine constant rather than a DataVoConfig property.

Execution & Planner ​

Vector & Hybrid Query Routing ​

PropertyDefaultDescription
EnableVectorPredicateFastPathtrueUses the vector index for WHERE v <=> @q < threshold and filtered distance ORDER BY.
VectorPredicateFastPathMinRows128Minimum table row count before invoking the vector index fast path.
VectorPredicateFastPathCandidateMultiplier3Multiplier from estimated qualifying rows to initial index candidates.
VectorPredicateFastPathMaxTopKRatio0.6Falls back to plain filtering when candidate requests exceed this share of the table.
VectorPredicateFastPathMaxTopK20000Hard cap on candidates requested from the vector index.
VectorPredicateFastPathMaxExpansionPasses2Maximum candidate-expansion retries before switching to a filter-first exact scan.
VectorPredicateFastPathExpansionFactor2Candidate growth multiplier per expansion pass.
EnableHybridOrderByAdaptiveInitialTopKtrueSizes the initial candidate request from estimated filter selectivity (LIMIT / selectivity).

HNSW graph parameters (m, ef_construction, ef_search) are configured per index in SQL. See Vector Search.

Experimental Volcano & Telemetry Switches ​

EnableVolcanoExecution (default false) and its Volcano* spill, external-sort, aggregate-partitioning, and join-feedback properties control an experimental operator pipeline used for planner testing; leave EnableVolcanoExecution = false in production.

Telemetry flags (EnableVectorPredicateFastPathTelemetry, EnableHybridRoutingTelemetryCounters, EnableHybridRoutingPerQueryTelemetry, HybridRoutingTelemetrySnapshotIntervalQueries) record hybrid vector routing diagnostics for benchmarks.

Security & Auth ​

PropertyDefaultDescription
EnableAuthorizationfalseEnforces users, roles, and SQL GRANT/REVOKE checks.
Username, Password""Credentials for the default session principal (or supply PasswordHash + PasswordSalt).
Role, RolesReadWrite, []Built-in role and custom role names assigned to the session principal.
AllowAnonymousSessiontruePermits unauthenticated sessions when EnableAuthorization is true.
AnonymousRoleDatabaseRole.ReadOnlyRole granted to anonymous sessions.
AuthorizationUsers[]List of DataVoAuthUser principals provisioned at startup.

See Also ​