From: Moiz Raja Date: Sun, 3 Aug 2014 13:36:13 +0000 (-0700) Subject: Keep DataChange registrations and notifications local X-Git-Tag: release/helium~353 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=b584e686fdeba863643f80c0894d7fbd2dcaa540;hp=b584e686fdeba863643f80c0894d7fbd2dcaa540 Keep DataChange registrations and notifications local Here is how it works -------------------- When a consumer registers for a datachange notification we first check if the Shard to which this registration needs to be sent is local. If it is then we send the registration to it. If it is not then we simply return a NoOpRegistration to the consumer. This ensures that a DataChange registration stays local to a cluster member. Now let's say we have 3 replicas and in all those replicas we do find a local shard for a given module and we have 3 listener registrations. At this time we do not want all 3 members to be notified of the change. We only want the node which is the Leader to notify it's listeners of the change. To restrict that the DataChangeListener will only forward events to the listener if the Shard sends it a message enabling notifications Change-Id: I035bbdf34e2509047f4bcb475c443a761b08e68d Signed-off-by: Moiz Raja ---