Actually I pushed https://git.opendaylight.org/gerrit/#/c/48846/ to change
the AbstractDOMStoreTreeChangePublisher to batch. I think it's better to do
it in the base class. I also have a patch to change the
DefaultShardDataTreeChangeListenerPublisher to derive from the mdsal
AbstractDOMStoreTreeChangePublisher.
I'll leave the AbstractDOMStoreTreeChangePublisher in controller as is.

On Thu, Dec 1, 2016 at 5:32 AM, Robert Varga <n...@hq.sk> wrote:

> 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/AbstractDOMStoreTreeChangePubl
> isher.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/AbstractDOMStoreTreeChangePubl
> isher.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/AbstractDOMStoreTreeChangePubl
> isher.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
>
>
> _______________________________________________
> controller-dev mailing list
> controller-dev@lists.opendaylight.org
> https://lists.opendaylight.org/mailman/listinfo/controller-dev
>
>
_______________________________________________
controller-dev mailing list
controller-dev@lists.opendaylight.org
https://lists.opendaylight.org/mailman/listinfo/controller-dev

Reply via email to