Bug 9008: Fix the error of the persisted journal data format 30/62530/2
authorHeYunBo <he.yunbo@zte.com.cn>
Fri, 18 Aug 2017 12:31:39 +0000 (20:31 +0800)
committerRobert Varga <nite@hq.sk>
Wed, 27 Sep 2017 08:21:43 +0000 (08:21 +0000)
commitc570de3f81a437b6591f7fc0f570a6ee2914c615
treebb1fd797c2ab543e3b349d961b542acad4cf1bae
parent8fd8a5cd918e198af4583917a238306cbe4e6ca2
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]