BUG-509: make sure datastore commits are visible
authorRobert Varga <rovarga@cisco.com>
Fri, 4 Apr 2014 17:50:57 +0000 (19:50 +0200)
committerRobert Varga <rovarga@cisco.com>
Sun, 6 Apr 2014 16:24:21 +0000 (18:24 +0200)
commit35fa905d94e79d6f16c432e5f8dfafdf16f2fc16
treef7f21f0542127f1d8e82d72a1690f97b82bde9d0
parentb6c6eac21b5d73ae932a20250764fdf6aac2340f
BUG-509: make sure datastore commits are visible

This wraps the datastore root in an AtomicReference, which makes sure
started transactions see the latest published commit. This will make
the datastore handling more robust under tight conditions.

Also uncovers the fact that we are invoking user code under lock, which
we fix by reusing the executor used by the commit machinery.

Finally it uncovers thread-unsafe listener list manipuation. This will
need to be addressed in a follow-up patch.

Change-Id: Ic7efd266ef680701c1f0944ee675122d8527568b
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/ChangeListenerNotifyTask.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDOMDataStore.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/ListenerRegistrationNode.java