Conversation
…arify its behavior in subscribe and get requests.
romeyod
left a comment
There was a problem hiding this comment.
should we add some guidance about how atomic containers should ideally not have frequently changing leafs/containers like counters?
| Update: some_counter | ||
| time: 121 # Disregarded: Overridden by the atomic notification at time 123 | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Can we also add some documentation about only delete notifications dont need atomic flag set as such notifications with Prefix are atomic (i.e. Delete the entire subtree)
| atomic: True | ||
| time: 123 | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Add a more simple example, ie:
prefix a/b
update: c/d
update: c/e
time: 1
prefix a/b
update: c/e
time: 2
Result is "a/b/c/d" is deleted.
|
|
||
| When the notification at `time: 124` is received, the atomic snapshot established at `time: 123` is invalidated. The parser must treat the tree under `a/b` as an evolving, non-atomic dataset from this point forward, until a new `atomic: True` notification is received for that prefix. | ||
|
|
||
| In practice, it is not recommended to mix atomic and non-atomic notifications for the same prefix, as it can lead to unexpected behavior, as noted above. |
There was a problem hiding this comment.
Let's say something like:
For OpenConfig data models, this behavior is not allowed. If a path is marked atomic in OpenConfig data models, the server must always send atomic updates. However, since gnmi is schema agnostic, this behavior might be useful for other schemas.
| atomic: True | ||
| time: 123 | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Seems like we might need an example added after this one where a subcontainer is updated with atomic true. ie:
Prefix: a/b
Update: c/d
atomic: True
time: 124
Expected client behavior is this would invalidate the notification at time:123
| atomic: True | ||
| time: 126 | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Add option that server may return a gRPC error if a subscription to a sub container is not supported.
Explain how the atomic flag works and interacts with oc-ext:atomic extension.
Copilot Summary:
This pull request updates the
gnmi-specification.mdto clarify and formalize the parsing and behavioral semantics of atomic notifications in the gNMI protocol. The most significant changes include a new section detailing how to parse atomic notifications, guidance for both clients and devices on handling atomic containers in subscriptions, and an update to the revision history to document these changes.Atomic Notification Parsing and Behavior:
atomicflag in aNotificationmessage should be interpreted, emphasizing schema-independence, implicit deletion of prior state, invalidation rules, and the importance of prefix scope.atomicfield in theNotificationmessage indicates an atomic update, and explained how atomic and non-atomic notifications affect the validity of cached state for a given prefix.Atomic Containers in Subscriptions and Requests:
Documentation and Navigation Updates:
atomicflag.