Jonathan Hart

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
......@@ -21,7 +21,6 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import org.apache.commons.lang3.tuple.Pair;
import org.onlab.util.AbstractAccumulator;
import org.onlab.util.KryoNamespace;
......@@ -33,18 +32,15 @@ import org.onosproject.store.Timestamp;
import org.onosproject.store.cluster.messaging.ClusterCommunicationService;
import org.onosproject.store.cluster.messaging.MessageSubject;
import org.onosproject.store.impl.LogicalTimestamp;
import org.onosproject.store.service.WallClockTimestamp;
import org.onosproject.store.serializers.KryoNamespaces;
import org.onosproject.store.serializers.KryoSerializer;
import org.onosproject.store.service.EventuallyConsistentMap;
import org.onosproject.store.service.EventuallyConsistentMapEvent;
import org.onosproject.store.service.EventuallyConsistentMapListener;
import org.onosproject.store.service.WallClockTimestamp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.onosproject.store.service.EventuallyConsistentMapEvent.Type.PUT;
import static org.onosproject.store.service.EventuallyConsistentMapEvent.Type.REMOVE;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
......@@ -67,6 +63,8 @@ import static com.google.common.base.Preconditions.checkState;
import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor;
import static org.onlab.util.BoundedThreadPool.newFixedThreadPool;
import static org.onlab.util.Tools.groupedThreads;
import static org.onosproject.store.service.EventuallyConsistentMapEvent.Type.PUT;
import static org.onosproject.store.service.EventuallyConsistentMapEvent.Type.REMOVE;
/**
* Distributed Map implementation which uses optimistic replication and gossip
......@@ -359,7 +357,7 @@ public class EventuallyConsistentMapImpl<K, V>
valueMatches = Objects.equals(value.get(), existing.get());
}
if (existing == null) {
log.debug("ECMap Remove: Existing value for key {} is already null", k);
log.trace("ECMap Remove: Existing value for key {} is already null", k);
}
if (valueMatches) {
if (existing == null) {
......
......@@ -193,7 +193,7 @@ public class GossipIntentStore
private Collection<NodeId> getPeerNodes(Key key, IntentData data) {
NodeId master = partitionService.getLeader(key);
NodeId origin = (data != null) ? data.origin() : null;
if (master == null || origin == null) {
if (data != null && (master == null || origin == null)) {
log.debug("Intent {} missing master and/or origin; master = {}, origin = {}",
key, master, origin);
}
......