From f62b017cc7eeb91279b1c3c633fac82a97e0a89f Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Wed, 19 Aug 2026 14:49:31 -0400 Subject: [PATCH] fix(localdb): fault live sync session on cap-prune; keepalive + newest-wins sync guard (0.3.2, ScadaBridge arch-review P4-1 + P4-3) --- ZB.MOM.WW.LocalDb/Directory.Build.props | 2 +- ZB.MOM.WW.LocalDb/README.md | 27 ++- .../Internal/OplogStore.cs | 23 ++- .../Internal/SyncSession.cs | 39 ++++ .../LocalDbOplogGapException.cs | 23 +++ .../LocalDbSyncService.cs | 117 ++++++++++- .../MaintenanceBackgroundService.cs | 2 +- .../ReplicationOptions.cs | 28 +++ .../ReplicationOptionsValidator.cs | 4 + .../SyncBackgroundService.cs | 36 +++- .../GrpcAdapterTests.cs | 18 +- .../SnapshotResyncTests.cs | 95 ++++++++- .../SyncStreamGuardTests.cs | 181 ++++++++++++++++++ 13 files changed, 574 insertions(+), 21 deletions(-) create mode 100644 ZB.MOM.WW.LocalDb/src/ZB.MOM.WW.LocalDb.Replication/LocalDbOplogGapException.cs create mode 100644 ZB.MOM.WW.LocalDb/tests/ZB.MOM.WW.LocalDb.Tests/SyncStreamGuardTests.cs diff --git a/ZB.MOM.WW.LocalDb/Directory.Build.props b/ZB.MOM.WW.LocalDb/Directory.Build.props index 63cf118..210aa41 100644 --- a/ZB.MOM.WW.LocalDb/Directory.Build.props +++ b/ZB.MOM.WW.LocalDb/Directory.Build.props @@ -5,7 +5,7 @@ enable enable latest - 0.3.1 + 0.3.2 true true