Drop a FIXME for partially-overwritten writes 59/13859/3
authorRobert Varga <rovarga@cisco.com>
Thu, 25 Dec 2014 08:13:39 +0000 (09:13 +0100)
committerRobert Varga <rovarga@cisco.com>
Wed, 7 Jan 2015 10:24:09 +0000 (11:24 +0100)
When a user performs a write, followed by a write which changes some
parts of the first one, we arrive at the resulting data in the prepare()
path. That is not right, as we can perform the merge in the seal() path.

The difference is that in MD-SAL the prepare() path is single-threaded,
while the seal() and read() path are executed in the application thread.
We really want to charge application-sourced mess to application
threads.

Change-Id: Iab2814f616ec8ca0d184513e5c8d3a3b8b1f2174
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/NormalizedNodeContainerModificationStrategy.java

index a8a378834d185b03d39d0dad3e20d1dc8e304c07..47e2e85e3e2e66817ecedd17f0014ade2050ad00 100644 (file)
@@ -92,6 +92,11 @@ abstract class NormalizedNodeContainerModificationStrategy extends SchemaAwareAp
          * As it turns out, once we materialize the written data, we can share the
          * code path with the subtree change. So let's create an unsealed TreeNode
          * and run the common parts on it -- which end with the node being sealed.
+         *
+         * FIXME: this code needs to be moved out from the prepare() path and into
+         *        the read() and seal() paths. Merging of writes needs to be charged
+         *        to the code which originated this, not to the code which is
+         *        attempting to make it visible.
          */
         final MutableTreeNode mutable = newValueMeta.mutable();
         mutable.setSubtreeVersion(version);