Bug 9008: Fix the error of the persisted journal data format 29/62529/1
authorHeYunBo <he.yunbo@zte.com.cn>
Fri, 18 Aug 2017 12:31:39 +0000 (20:31 +0800)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 31 Aug 2017 20:10:02 +0000 (22:10 +0200)
commit9ea02d25f7e10d4671fb86adc83486e25dec6226
treee9f08ebd87a71158fcd17bc5f745e30bda39d2b1
parentc18c8af26b788a16af4239b76173b8a3bceb68e6
Bug 9008: Fix the error of the persisted journal data format

We have to clear the lastLeafSetQName while processing the end event for node
in NormalizedNodeInputStreamReader and AbstractNormalizedNodeDataOutput.

Otherwise while processing the leaf-list node, the leaf-list entry node
may use the other LeafSetQName as it's node identifier incorrectly.
The DataTree reconstructed from the persisted journal after the controller
restart will be not equal to the DataTree before restart under certain
circumstances.

Change-Id: I4ee823f59fe477d08f982ae73e3850433dfea8ee
Signed-off-by: HeYunBo <he.yunbo@zte.com.cn>
(cherry picked from commit 0077859d16ed922af1449f075033069f4d9dbffe)
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractNormalizedNodeDataOutput.java [changed mode: 0644->0755]
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeInputStreamReader.java [changed mode: 0644->0755]