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>
@Override
public void endNode() throws IOException, IllegalStateException {
LOG.trace("Ending the node");
-
+ lastLeafSetQName = null;
output.writeByte(NodeTypes.END_NODE);
}
if (nodeType == NodeTypes.END_NODE) {
LOG.trace("End node reached. return");
+ lastLeafSetQName = null;
return null;
}