chore(deps): pin ZB.MOM.WW.LocalDb 0.3.8 (scadaproj#57)
v2-ci / unit-tests (push) Has been cancelled
v2-ci / unit-tests (push) Has been cancelled
LocalDb 0.3.8 ends open sync streams on ApplicationStopping and refuses new ones Unavailable while stopping (lmxopcua#906, library side). The host-side ShutdownStreamCancellationInterceptor stays: it also covers the mesh telemetry/command streams. GracefulStopWithOpenSyncStreamTests' positive control started passing the stop in ~950 ms under 0.3.8, because the library alone now ends the stream. The control registers LocalDbSyncService without the host lifetime (the 0.3.7 behaviour), so it still reproduces the 8 s drain. Release build 0 warnings. Host.Tests 288/288, Host.IntegrationTests 350 passed / 2 skipped, Runtime.Tests 1063 passed / 3 skipped, Core.AlarmHistorian.Tests 53/53. Claude-Session: https://claude.ai/code/session_01GT67ACmpMR7b9LGRPLijMi
This commit is contained in:
@@ -227,8 +227,8 @@
|
|||||||
package floors the native SQLitePCLRaw.lib.e_sqlite3 at 2.1.12, so consumers inherit the
|
package floors the native SQLitePCLRaw.lib.e_sqlite3 at 2.1.12, so consumers inherit the
|
||||||
CVE-2025-6965-fixed native binary without needing the surgical pin below.
|
CVE-2025-6965-fixed native binary without needing the surgical pin below.
|
||||||
-->
|
-->
|
||||||
<PackageVersion Include="ZB.MOM.WW.LocalDb" Version="0.3.7" />
|
<PackageVersion Include="ZB.MOM.WW.LocalDb" Version="0.3.8" />
|
||||||
<PackageVersion Include="ZB.MOM.WW.LocalDb.Replication" Version="0.3.7" />
|
<PackageVersion Include="ZB.MOM.WW.LocalDb.Replication" Version="0.3.8" />
|
||||||
<PackageVersion Include="ZB.MOM.WW.Health.Akka" Version="0.3.0" />
|
<PackageVersion Include="ZB.MOM.WW.Health.Akka" Version="0.3.0" />
|
||||||
<PackageVersion Include="ZB.MOM.WW.Health.EntityFrameworkCore" Version="0.3.0" />
|
<PackageVersion Include="ZB.MOM.WW.Health.EntityFrameworkCore" Version="0.3.0" />
|
||||||
<PackageVersion Include="ZB.MOM.WW.Telemetry" Version="0.3.1" />
|
<PackageVersion Include="ZB.MOM.WW.Telemetry" Version="0.3.1" />
|
||||||
|
|||||||
+17
@@ -12,7 +12,10 @@ using Microsoft.AspNetCore.Http.Features;
|
|||||||
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
using Shouldly;
|
using Shouldly;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using ZB.MOM.WW.LocalDb;
|
using ZB.MOM.WW.LocalDb;
|
||||||
@@ -168,6 +171,20 @@ public sealed class GracefulStopWithOpenSyncStreamTests
|
|||||||
});
|
});
|
||||||
builder.Services.AddSingleton(db);
|
builder.Services.AddSingleton(db);
|
||||||
builder.Services.AddZbLocalDbReplication(ReplicationConfig(peerAddress: null));
|
builder.Services.AddZbLocalDbReplication(ReplicationConfig(peerAddress: null));
|
||||||
|
if (!withFix)
|
||||||
|
{
|
||||||
|
// From LocalDb 0.3.8 the library itself ends open sync streams on ApplicationStopping
|
||||||
|
// (scadaproj#57), which would hide the #906 drain in this control. Re-register the
|
||||||
|
// service WITHOUT the host lifetime, i.e. the 0.3.7 behaviour, so the control still
|
||||||
|
// reproduces the bug the host-side fix guards against.
|
||||||
|
builder.Services.Replace(ServiceDescriptor.Singleton(sp => new LocalDbSyncService(
|
||||||
|
sp.GetRequiredService<ILocalDb>(),
|
||||||
|
sp.GetRequiredService<IOptions<ReplicationOptions>>(),
|
||||||
|
sp.GetRequiredService<ILoggerFactory>(),
|
||||||
|
sp.GetService<LocalDbMetrics>(),
|
||||||
|
sp.GetService<ISyncStatus>(),
|
||||||
|
lifetime: null)));
|
||||||
|
}
|
||||||
|
|
||||||
builder.Services.AddAkka("otopcua906", (ab, _) => ab.AddHocon(
|
builder.Services.AddAkka("otopcua906", (ab, _) => ab.AddHocon(
|
||||||
ConfigurationFactory.ParseString(
|
ConfigurationFactory.ParseString(
|
||||||
|
|||||||
Reference in New Issue
Block a user