Suppress log message about IntentData without origin set.
Also similar log in ECMap when we try to remove an already-null value. Change-Id: Ie059f60fd3406ba0e1824b43c6fe122a5064ed6f
Showing
2 changed files
with
5 additions
and
7 deletions
| ... | @@ -21,7 +21,6 @@ import com.google.common.collect.ImmutableMap; | ... | @@ -21,7 +21,6 @@ import com.google.common.collect.ImmutableMap; |
| 21 | import com.google.common.collect.Lists; | 21 | import com.google.common.collect.Lists; |
| 22 | import com.google.common.collect.Maps; | 22 | import com.google.common.collect.Maps; |
| 23 | import com.google.common.collect.Sets; | 23 | import com.google.common.collect.Sets; |
| 24 | - | ||
| 25 | import org.apache.commons.lang3.tuple.Pair; | 24 | import org.apache.commons.lang3.tuple.Pair; |
| 26 | import org.onlab.util.AbstractAccumulator; | 25 | import org.onlab.util.AbstractAccumulator; |
| 27 | import org.onlab.util.KryoNamespace; | 26 | import org.onlab.util.KryoNamespace; |
| ... | @@ -33,18 +32,15 @@ import org.onosproject.store.Timestamp; | ... | @@ -33,18 +32,15 @@ import org.onosproject.store.Timestamp; |
| 33 | import org.onosproject.store.cluster.messaging.ClusterCommunicationService; | 32 | import org.onosproject.store.cluster.messaging.ClusterCommunicationService; |
| 34 | import org.onosproject.store.cluster.messaging.MessageSubject; | 33 | import org.onosproject.store.cluster.messaging.MessageSubject; |
| 35 | import org.onosproject.store.impl.LogicalTimestamp; | 34 | import org.onosproject.store.impl.LogicalTimestamp; |
| 36 | -import org.onosproject.store.service.WallClockTimestamp; | ||
| 37 | import org.onosproject.store.serializers.KryoNamespaces; | 35 | import org.onosproject.store.serializers.KryoNamespaces; |
| 38 | import org.onosproject.store.serializers.KryoSerializer; | 36 | import org.onosproject.store.serializers.KryoSerializer; |
| 39 | import org.onosproject.store.service.EventuallyConsistentMap; | 37 | import org.onosproject.store.service.EventuallyConsistentMap; |
| 40 | import org.onosproject.store.service.EventuallyConsistentMapEvent; | 38 | import org.onosproject.store.service.EventuallyConsistentMapEvent; |
| 41 | import org.onosproject.store.service.EventuallyConsistentMapListener; | 39 | import org.onosproject.store.service.EventuallyConsistentMapListener; |
| 40 | +import org.onosproject.store.service.WallClockTimestamp; | ||
| 42 | import org.slf4j.Logger; | 41 | import org.slf4j.Logger; |
| 43 | import org.slf4j.LoggerFactory; | 42 | import org.slf4j.LoggerFactory; |
| 44 | 43 | ||
| 45 | -import static org.onosproject.store.service.EventuallyConsistentMapEvent.Type.PUT; | ||
| 46 | -import static org.onosproject.store.service.EventuallyConsistentMapEvent.Type.REMOVE; | ||
| 47 | - | ||
| 48 | import java.util.Collection; | 44 | import java.util.Collection; |
| 49 | import java.util.Collections; | 45 | import java.util.Collections; |
| 50 | import java.util.List; | 46 | import java.util.List; |
| ... | @@ -67,6 +63,8 @@ import static com.google.common.base.Preconditions.checkState; | ... | @@ -67,6 +63,8 @@ import static com.google.common.base.Preconditions.checkState; |
| 67 | import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; | 63 | import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; |
| 68 | import static org.onlab.util.BoundedThreadPool.newFixedThreadPool; | 64 | import static org.onlab.util.BoundedThreadPool.newFixedThreadPool; |
| 69 | import static org.onlab.util.Tools.groupedThreads; | 65 | import static org.onlab.util.Tools.groupedThreads; |
| 66 | +import static org.onosproject.store.service.EventuallyConsistentMapEvent.Type.PUT; | ||
| 67 | +import static org.onosproject.store.service.EventuallyConsistentMapEvent.Type.REMOVE; | ||
| 70 | 68 | ||
| 71 | /** | 69 | /** |
| 72 | * Distributed Map implementation which uses optimistic replication and gossip | 70 | * Distributed Map implementation which uses optimistic replication and gossip |
| ... | @@ -359,7 +357,7 @@ public class EventuallyConsistentMapImpl<K, V> | ... | @@ -359,7 +357,7 @@ public class EventuallyConsistentMapImpl<K, V> |
| 359 | valueMatches = Objects.equals(value.get(), existing.get()); | 357 | valueMatches = Objects.equals(value.get(), existing.get()); |
| 360 | } | 358 | } |
| 361 | if (existing == null) { | 359 | if (existing == null) { |
| 362 | - log.debug("ECMap Remove: Existing value for key {} is already null", k); | 360 | + log.trace("ECMap Remove: Existing value for key {} is already null", k); |
| 363 | } | 361 | } |
| 364 | if (valueMatches) { | 362 | if (valueMatches) { |
| 365 | if (existing == null) { | 363 | if (existing == null) { | ... | ... |
| ... | @@ -193,7 +193,7 @@ public class GossipIntentStore | ... | @@ -193,7 +193,7 @@ public class GossipIntentStore |
| 193 | private Collection<NodeId> getPeerNodes(Key key, IntentData data) { | 193 | private Collection<NodeId> getPeerNodes(Key key, IntentData data) { |
| 194 | NodeId master = partitionService.getLeader(key); | 194 | NodeId master = partitionService.getLeader(key); |
| 195 | NodeId origin = (data != null) ? data.origin() : null; | 195 | NodeId origin = (data != null) ? data.origin() : null; |
| 196 | - if (master == null || origin == null) { | 196 | + if (data != null && (master == null || origin == null)) { |
| 197 | log.debug("Intent {} missing master and/or origin; master = {}, origin = {}", | 197 | log.debug("Intent {} missing master and/or origin; master = {}, origin = {}", |
| 198 | key, master, origin); | 198 | key, master, origin); |
| 199 | } | 199 | } | ... | ... |
-
Please register or login to post a comment