Class TsakUniqueBackfill

Assembly: redb.Tsak.Core.dll

One-time V4 migration pass: stamps ValueUnique onto rows written by pre-key
versions of Tsak. A NULL key sits
outside the partial unique index, so without this pass legacy rows would coexist with
keyed ones and escape the "one record per key" guarantee. Idempotent: rows that
already carry a key are never touched, a second run is a single server-side probe.
Duplicates (the trace of the old check-then-insert races) resolve deterministically:
the lowest id wins — the same winner the old self-healing picked.

public static class TsakUniqueBackfill

Inheritance

Object→TsakUniqueBackfill

Methods

RunAsync<TProps>(IRedbService, Func<RedbObject<TProps>, string?>, DuplicatePolicy, ILogger, Action<RedbObject<TProps>>?)

computeKey returns the ValueUnique for a legacy row, or null

public static Task RunAsync<TProps>(IRedbService redb, Func<RedbObject<TProps>, string?> computeKey, TsakUniqueBackfill.DuplicatePolicy duplicates, ILogger logger, Action<RedbObject<TProps>>? amend = null) where TProps : class, new()