[MDSAL-107] Wildcard DataChangeListeners are not being notified of preexisting data on registration Created: 16/Oct/15  Updated: 13/Nov/18  Resolved: 13/Nov/18

Status: Verified
Project: mdsal
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Valentin Mayamsin Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Java Source File unit-test.java    
Issue Links:
Relates
relates to MDSAL-217 Cache support API to improve clustere... Resolved
External issue ID: 4482

 Description   

Quote from documentation for org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker#registerDataChangeListener:

"If there is any preexisting data in data tree on path for which you are registering, you will receive initial data change event, which will contain all preexisting data, marked as created."

However DataChangeListener are not being notified of preexisting data on registration when wildcard ID is used

Version: Helium-SR4

Sample unit test attached



 Comments   
Comment by Valentin Mayamsin [ 16/Oct/15 ]

Attachment unit-test.java has been added with description: WildcardListenerTest

Comment by Moiz Raja [ 16/Oct/15 ]

Valentin, could you please submit a gerrit with this test?

Comment by Valentin Mayamsin [ 16/Oct/15 ]

Moiz, which project should it go into?

Comment by Moiz Raja [ 16/Oct/15 ]

I would like you to push the unit test to the controller code base in the md-sal common project.

Comment by Valentin Mayamsin [ 16/Oct/15 ]

UT https://git.opendaylight.org/gerrit/#/c/28525/

Comment by Tom Pantelis [ 15/Sep/17 ]

This does not work with the in-memory data store b/c it performs a read of the registered path in order to determine the initial notification event but the data tree does not allow wildcarded reads so no data is returned. This was fixed in CDS by https://git.opendaylight.org/gerrit/#/c/26949/. We'll have to do something similar in the in-memory data store.

Comment by Tom Pantelis [ 25/Oct/17 ]

Submitted https://git.opendaylight.org/gerrit/#/c/64734/ for the md-sal project. This fixes the issue for DataTreeChangeListener - DataChangeListener is deprecated and in fact doesn't even exist in the md-sal project.

Generated at Wed Feb 07 20:08:39 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.