fix(galaxy): invalidate writer handle caches on session reconnect
Add IGalaxyDataWriter.InvalidateHandleCaches() and call it in GalaxyDriver.ReopenAsync after RecreateAsync succeeds. Prior to this fix, GatewayGalaxyDataWriter's _itemHandles and _supervisedHandles dictionaries survived across reconnects, causing the next write to skip AddItem and AdviseSupervisory against already-dead handles.
This commit is contained in:
@@ -10,6 +10,10 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Runtime;
|
||||
/// </summary>
|
||||
internal sealed class TracedGalaxyDataWriter(IGalaxyDataWriter inner, string clientName) : IGalaxyDataWriter
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <remarks>No span — this is a local cache-clear operation, not a gateway round-trip.</remarks>
|
||||
public void InvalidateHandleCaches() => inner.InvalidateHandleCaches();
|
||||
|
||||
/// <summary>Writes data to Galaxy while recording telemetry span.</summary>
|
||||
/// <param name="writes">The list of write requests to process.</param>
|
||||
/// <param name="securityResolver">Function to resolve security classification for tag references.</param>
|
||||
|
||||
Reference in New Issue
Block a user