On 12/01/2016 09:46 AM, Faiz Kothari wrote:
> Hey Sela,
> 
> So I started going through the code for DataTreeChangeListener
> registration which led me to the following code:
> 
> https://github.com/opendaylight/controller/blob/master/opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/data/AbstractDOMStoreTreeChangePublisher.java#L58
> 
> and
> 
> https://github.com/opendaylight/controller/blob/master/opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/data/AbstractDOMStoreTreeChangePublisher.java#L93
> 
> and 
> 
> https://github.com/opendaylight/controller/blob/master/opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/data/AbstractDOMStoreTreeChangePublisher.java#L110
> 
> Just go through these, it seems listeners are getting notified as the
> tree is traversed. Hence you are not getting the snapshot as one whole
> snapshot.

Right. This is a remnant of the initial DataTreeChangeListener
implementation, as DataChangeListener did not have the capability to
report multiple changes in one go.

The fix is rather simple: DefaultShardDataTreeChangeListenerPublisher
should instantiate a MultiMap<Registration, DataTreeCandidate> in
publishChanges(), fill it in notifyListeners() and traverse it in
publishChanges() once processCandidateTree() returns.

Regards,
Robert

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
controller-dev mailing list
controller-dev@lists.opendaylight.org
https://lists.opendaylight.org/mailman/listinfo/controller-dev

Reply via email to