Class RedbTsakModuleStore
Redb-backed module store. Persists module metadata across restarts and cluster nodes.
The key lives in ValueUnique: one record per module is enforced by the
database, and SaveByUniqueAsync makes a true upsert —
two nodes discovering the same module concurrently converge on one record.
The key is "{cluster}:{module}" (): several clusters on one
database keep their own record of an equally named module. A record written before cluster
isolation (bare module name, no ) is still read until
this cluster saves the module; removing a module removes that old record too.
value_string still mirrors the name for dashboard visibility.
Every operation awaits a one-time ensure step (scheme sync + legacy backfill), so hosts
without TsakHostedService and reads racing its startup see pre-V4 rows
(review 2026-09-02, В4).
public class RedbTsakModuleStore : ITsakModuleStore
Inheritance
Implements
Methods
GetAllAsync()
public Task<IReadOnlyList<TsakModuleRecord>> GetAllAsync()
GetAsync(string)
public Task<TsakModuleRecord?> GetAsync(string moduleName)
RemoveAsync(string)
public Task RemoveAsync(string moduleName)
SaveAsync(TsakModuleRecord)
public Task SaveAsync(TsakModuleRecord record)
SaveBatchAsync(IEnumerable<TsakModuleRecord>)
public Task SaveBatchAsync(IEnumerable<TsakModuleRecord> records)