Fix Hazelcast event suppression.
- ignore event triggered by local node, not if the subject is about local node. Change-Id: I50858a8b9272966f597f5172a0227f14afbc72c4
Showing
1 changed file
with
1 additions
and
7 deletions
... | @@ -31,7 +31,6 @@ import com.hazelcast.core.EntryEvent; | ... | @@ -31,7 +31,6 @@ import com.hazelcast.core.EntryEvent; |
31 | import com.hazelcast.core.EntryListener; | 31 | import com.hazelcast.core.EntryListener; |
32 | import com.hazelcast.core.IAtomicLong; | 32 | import com.hazelcast.core.IAtomicLong; |
33 | import com.hazelcast.core.MapEvent; | 33 | import com.hazelcast.core.MapEvent; |
34 | - | ||
35 | import static org.onlab.onos.net.MastershipRole.*; | 34 | import static org.onlab.onos.net.MastershipRole.*; |
36 | 35 | ||
37 | /** | 36 | /** |
... | @@ -351,12 +350,7 @@ implements MastershipStore { | ... | @@ -351,12 +350,7 @@ implements MastershipStore { |
351 | 350 | ||
352 | @Override | 351 | @Override |
353 | public void entryUpdated(EntryEvent<DeviceId, RoleValue> event) { | 352 | public void entryUpdated(EntryEvent<DeviceId, RoleValue> event) { |
354 | - NodeId myId = clusterService.getLocalNode().id(); | 353 | + |
355 | - NodeId node = event.getValue().get(MASTER); | ||
356 | - if (myId.equals(node)) { | ||
357 | - // XXX or do we just let it get sent and caught by ourself? | ||
358 | - return; | ||
359 | - } | ||
360 | notifyDelegate(new MastershipEvent( | 354 | notifyDelegate(new MastershipEvent( |
361 | MASTER_CHANGED, event.getKey(), event.getValue().roleInfo())); | 355 | MASTER_CHANGED, event.getKey(), event.getValue().roleInfo())); |
362 | } | 356 | } | ... | ... |
-
Please register or login to post a comment