Replace full address space rebuild with incremental subtree sync
On Galaxy deploy changes, only the affected gobject subtrees are torn down and rebuilt instead of destroying the entire address space. Unchanged nodes, subscriptions, and alarm tracking continue uninterrupted. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -181,17 +181,20 @@ When a Galaxy deployment change is detected, the server shall rebuild the addres
|
||||
|
||||
### Acceptance Criteria
|
||||
|
||||
- When Galaxy Repository detects a deployment change, the OPC UA address space is rebuilt.
|
||||
- When Galaxy Repository detects a deployment change, the OPC UA address space is updated.
|
||||
- Only changed gobject subtrees are torn down and rebuilt; unchanged nodes, subscriptions, and alarm tracking remain intact.
|
||||
- Existing OPC UA client sessions are preserved — clients stay connected.
|
||||
- Subscriptions for tags that still exist after rebuild continue to work.
|
||||
- Subscriptions for tags on unchanged objects continue to work without interruption.
|
||||
- Subscriptions for tags that no longer exist receive a Bad_NodeIdUnknown status notification.
|
||||
- Rebuild is logged at Information level with timing (duration).
|
||||
- Sync is logged at Information level with the number of changed gobjects.
|
||||
|
||||
### Details
|
||||
|
||||
- Rebuild is a full replace, not an incremental diff. Re-query hierarchy and attributes, build new tree, swap atomically.
|
||||
- During rebuild, reads/writes against the old address space may fail briefly. This is acceptable.
|
||||
- New MXAccess subscriptions for new tags are established; removed tags are unsubscribed.
|
||||
- Uses incremental subtree sync: compares previous hierarchy+attributes with new, identifies changed gobject IDs, expands to include child subtrees, tears down only affected subtrees, and rebuilds them.
|
||||
- First build (no cached state) performs a full build.
|
||||
- If no changes are detected, the sync is a no-op (logged and skipped).
|
||||
- Alarm tracking and MXAccess subscriptions for unchanged objects are not disrupted.
|
||||
- Falls back to full rebuild behavior if the entire hierarchy changes.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user