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:
Joseph Doherty
2026-06-14 00:39:24 -04:00
parent 42b4a923fd
commit f77488eed9
7 changed files with 144 additions and 0 deletions
@@ -178,6 +178,9 @@ public sealed class GalaxyTelemetryTests
CancellationToken cancellationToken)
=> Task.FromResult<IReadOnlyList<WriteResult>>(
writes.Select(_ => new WriteResult(0u)).ToList());
/// <inheritdoc />
public void InvalidateHandleCaches() { /* no-op — this fake has no handle caches */ }
}
private sealed class FakeHierarchy : IGalaxyHierarchySource