[CONTROLLER-647] onDataChange notification is not returning any data to the getCreatedData and getModifiedData function calls. Data change notification does not seem to work. Created: 24/Jul/14  Updated: 06/Aug/14  Due: 05/Aug/14  Resolved: 06/Aug/14

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Ramkumar Gowrishankar Assignee: Jan Hajnar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Issue Links:
Duplicate
is duplicated by BGPCEP-115 NPE in ODL Logs during the change in ... Resolved
External issue ID: 1418

 Description   

After rebase on July 24th, the AsyncDataChangeEvent getCreatedData and getUpdatedData is no longer returning any data.
I have uploaded the sample code to git fetch https://git.opendaylight.org/gerrit/controller refs/changes/04/8804/2 && git checkout FETCH_HEAD

Essentially, I am creating a node extension, and then registering for data changes on the node extension.
dataChangeListenerRegistration = dataService.registerDataChangeListener(LogicalDatastoreType.CONFIGURATION,InstanceIdentifier.builder(Nodes.class) .child(Node.class).augmentation(SampleTestNode.class).toInstance(),wakeupListener,DataChangeScope.SUBTREE);

and then in the onDataChanged method:
public void onDataChanged(final AsyncDataChangeEvent<InstanceIdentifier<?>, DataObject> change) {
Map<InstanceIdentifier<?>, DataObject> created = change.getCreatedData();
Map<InstanceIdentifier<?>, DataObject> modified = change.getUpdatedData();
if(created.isEmpty())

{ System.out.println("created map is empty"); }

if(modified.isEmpty())

{ System.out.println("modified map is empty"); }

}

In both the created/updated scenarios, the appropriate maps are empty.



 Comments   
Comment by Jan Hajnar [ 05/Aug/14 ]

fix:
https://git.opendaylight.org/gerrit/#/c/9687/

Generated at Wed Feb 07 19:53:32 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.