Merge branch 'review/wp6' into review/integration
# Conflicts: # docs/requirements/Component-StoreAndForward.md # src/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase/Repositories/DeploymentManagerRepository.cs # src/ZB.MOM.WW.ScadaBridge.StoreAndForward/StoreAndForwardStorage.cs # src/ZB.MOM.WW.ScadaBridge.Transport/Import/BundleImporter.cs # tests/ZB.MOM.WW.ScadaBridge.StoreAndForward.Tests/StoreAndForwardStorageTests.cs
This commit is contained in:
@@ -270,6 +270,17 @@ know. `SourceNode` is stamped by the
|
||||
writing node itself (`node-a` / `node-b`) at append time and travels with the row
|
||||
through telemetry and reconciliation unchanged.
|
||||
|
||||
**Connections and indexes (WP6, 2026-12-03).** The writer and the read-only callers use
|
||||
two *private-cache* WAL connections (AUD-2 — `Cache=Shared` made them share table-level
|
||||
locks, so a long backlog scan stalled the batch writer); only the in-memory test override
|
||||
keeps a shared cache. The reconciliation pull reads the owed states through the partial
|
||||
index `IX_fwd_owed (OccurredAtUtc, EventId) WHERE ForwardState IN ('Pending','PushAbandoned','Rejected')`,
|
||||
so each page is an ordered range read that stops at the limit (AUD-3; 1 M owed rows:
|
||||
3.5 s → <1 ms per 256-row page), and the retention purge seeks `IX_fwd` on
|
||||
`(ForwardState, IsCachedKind, OccurredAtUtc)` instead of walking each state's whole range
|
||||
(AUD-4). The cached-telemetry drain resolves a batch's tracking snapshots with one batched
|
||||
read of its distinct operation ids (AUD-7).
|
||||
|
||||
**Site SQLite retention rule (hard invariant):**
|
||||
|
||||
> A row is eligible for purge only when both `OccurredAtUtc < retention threshold` AND `ForwardState IN ('Forwarded', 'Reconciled')`. Pending rows — and the owed push-exit states `PushAbandoned` / `Rejected` — are never purged.
|
||||
@@ -774,7 +785,9 @@ MS SQL for direct-write events). Unredacted secrets never persist.
|
||||
aid, not a compliance record) whose value is a retention window in days that
|
||||
MUST be strictly shorter than the global `RetentionDays`. After the daily
|
||||
partition switch-out, the purge actor runs a bounded, batched row DELETE
|
||||
(`PurgeChannelOlderThanAsync`) for each channel whose override is shorter than
|
||||
(`PurgeChannelOlderThanAsync`, seeking the partition-aligned
|
||||
`IX_AuditLog_Channel_Occurred (Category, OccurredAtUtc)` with the channel bound as
|
||||
`varchar(32)` — AUD-5) for each channel whose override is shorter than
|
||||
the global window — expiring rows of that channel earlier than the global
|
||||
partition switch would. Overrides equal to or longer than the global window are
|
||||
silently skipped (the global switch already covers them). The DELETE runs under
|
||||
|
||||
Reference in New Issue
Block a user