commit | 3195f55ef4938069c349bbdeb75db5a2d36e7153 | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@onlab.us> | Fri Oct 24 22:07:05 2014 -0700 |
committer | Yuta HIGUCHI <y-higuchi@onlab.us> | Sun Oct 26 19:44:55 2014 -0700 |
tree | dcfb131037fcf19a7b1e2a11e840d34c355490ff | |
parent | f5416d82cfd537ef2b560d471e001525c8e4621f [diff] [blame] |
Fix Hazelcast event suppression. - ignore event triggered by local node, not if the subject is about local node. Change-Id: I50858a8b9272966f597f5172a0227f14afbc72c4
diff --git a/core/store/hz/cluster/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java b/core/store/hz/cluster/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java index f9352fe..1af5727 100644 --- a/core/store/hz/cluster/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java +++ b/core/store/hz/cluster/src/main/java/org/onlab/onos/store/mastership/impl/DistributedMastershipStore.java
@@ -31,7 +31,6 @@ import com.hazelcast.core.EntryListener; import com.hazelcast.core.IAtomicLong; import com.hazelcast.core.MapEvent; - import static org.onlab.onos.net.MastershipRole.*; /** @@ -351,12 +350,7 @@ @Override public void entryUpdated(EntryEvent<DeviceId, RoleValue> event) { - NodeId myId = clusterService.getLocalNode().id(); - NodeId node = event.getValue().get(MASTER); - if (myId.equals(node)) { - // XXX or do we just let it get sent and caught by ourself? - return; - } + notifyDelegate(new MastershipEvent( MASTER_CHANGED, event.getKey(), event.getValue().roleInfo())); }