Repository navigation
Fix outgoing telemetry DatasetWriterName unexpected suffix - #2453
Merged
Marc Schier (marcschier) merged 5 commits intoJun 8, 2026
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix unexpected suffix in DatasetWriterName for telemetry
Fix outgoing telemetry DatasetWriterName unexpected suffix
Jun 8, 2026
Marc Schier (marcschier)
approved these changes
Jun 8, 2026
Marc Schier (marcschier)
marked this pull request as ready for review
June 8, 2026 14:15
Marc Schier (marcschier)
deleted the
copilot/fix-outgoing-telemetry-suffix
branch
June 8, 2026 15:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
opc-publisher could append a numeric suffix to a writer's
DataSetWriterName(e.g.expected1instead ofexpected) on outgoing telemetry despite no duplicate writers, and a container restart would change the emitted name — both surprising and non-deterministic.Root cause
WriterGroupDataSource.UpdateAsynctracks live writer names in a localwriterNamesset used byCreateUniqueWriterNamefor deduplication. When a reconfiguration changes a writer's equality/hash (e.g. topic, QoS, TTL, publishing interval), the writer is removed and re-added. On removal the subscription was disposed and dropped from_writers, but its name was not removed fromwriterNames. The re-added writer then collided with its own stale name and got a suffix.Since
writerNamesis rebuilt from live writers each update, the name oscillated with the parity of hash-changing reconfigurations — explaining both the intermittent suffix and why a restart (freshStartAsyncfrom an empty set) reset it.Changes
WriterGroupDataSource.UpdateAsync: release the writer's name fromwriterNameswhen removing it, so a re-added writer reuses the same name deterministically.WriterGroupDataSourceTests: added a regression test that reconfigures a single writer in a way that forces remove+add and asserts the emitted messageWriterNamestaysexpected(fails asexpected1without the fix).