[CONTROLLER-1752] Something wrong with the Journal recovery Created: 18/Aug/17  Updated: 19/Oct/17  Resolved: 30/Sep/17

Status: Resolved
Project: controller
Component/s: clustering
Affects Version/s: Beryllium
Fix Version/s: None

Type: Bug
Reporter: HeYunBo Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 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

{ type string; }
leaf state { type string; }

list fc-route {
key "fc-route-id";
leaf fc-route-id

{ type string; }
leaf-list current-layer-link { type string; }

list route-info {
ordered-by user;
leaf lower-fc-id

{ type string; }

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]



 Comments   
Comment by HeYunBo [ 18/Aug/17 ]

I have fixed it on
https://git.opendaylight.org/gerrit/#/c/61967/

Comment by Robert Varga [ 01/Sep/17 ]

nitrogen: https://git.opendaylight.org/gerrit/#/c/62530/1
carbon: https://git.opendaylight.org/gerrit/#/c/62529/1

Generated at Wed Feb 07 19:56:22 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.