Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
Beryllium
-
None
-
None
-
Operating System: All
Platform: All
-
9008
Description
For example, the yang file as follows, the current-layer-link node is an exception when Journal recovery
module simulate {
yang-version 1;
namespace "urn:opendaylight:params:xml:ns:yang:simulate";
prefix "simulate";
container forwarding {
list top-fc {
key "fc-id";
leaf fc-id
leaf state { type string; }
list fc-route {
key "fc-route-id";
leaf fc-route-id
leaf-list current-layer-link { type string; }
list route-info {
ordered-by user;
leaf lower-fc-id
leaf-list fc-port-ref
{ ordered-by user; type string; } }
}
}
}
}
First, put the fcRoute[1]
tx1.put("forwarding/top-fc/top-fc[fc-id=01]/fc-route/fc-route[fc-route-id=0001]", fcRoute[1])
tx1.submit()
And then, modify the top-fc.state by merge
topFc = tx2.read("forwarding/top-fc/top-fc[fc-id=01])
topFc.state = disable
tx2.merge("forwarding/top-fc/top-fc[fc-id=01], topFc)
and put the new fcRoute[2]
tx2.put("forwarding/top-fc/top-fc[fc-id=01]/fc-route/fc-route[fc-route-id=0002]", fcRoute[2])
tx2.submit()
finally, the DataTreeCandidate will get the wrong result in fcRoute[1].current-layer-link when Journal recovery
fcRoute[1].current-layer-link's Qname will be the fc-port-ref, instead of current-layer-link
the key point is the merge operation, it will lead to the SUBTREE_MODIFIED of fc-route[1].current-layer-link, the LeafSetNode of current-layer-link will be skipped, and write the LeafSetEntryNode of current-layer-link directly. However, the lastLeafSetQName has been set to the fc-port-ref in AbstractNormalizedNodeDataOutput because of the fcRoute[2]
Attachments
| # | Subject | Branch | Project | Status | CR | V |
|---|---|---|---|---|---|---|
| 80888,2 | Improve NormalizedNodeInputStreamReader defensiveness | master | controller | Status: MERGED | +2 | +1 |
| 81010,1 | Improve NormalizedNodeInputStreamReader defensiveness | stable/neon | controller | Status: MERGED | +2 | +1 |