Repository: ignite
Updated Branches:
  refs/heads/ignite-6467-1 [created] 9d0c46bd8


ignite-6467-1


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9d0c46bd
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9d0c46bd
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9d0c46bd

Branch: refs/heads/ignite-6467-1
Commit: 9d0c46bd8471bbd05a64ffa61aa47d8ca5bbd7fd
Parents: 4dfcf18
Author: sboikov <sboi...@apache.org>
Authored: Sat Jul 28 18:01:14 2018 +0300
Committer: sboikov <sboi...@apache.org>
Committed: Sat Jul 28 18:01:14 2018 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/TestDebugLog1.java   | 541 -------------------
 .../affinity/GridAffinityAssignmentCache.java   |  10 -
 .../processors/cache/GridCacheMapEntry.java     |   7 -
 .../distributed/dht/GridDhtCacheEntry.java      |   5 -
 .../distributed/dht/GridDhtLocalPartition.java  |  12 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |   8 -
 .../dht/GridPartitionedSingleGetFuture.java     |  15 -
 .../GridDhtAtomicAbstractUpdateFuture.java      |   3 -
 .../GridNearAtomicSingleUpdateFuture.java       |   4 -
 .../GridDhtPartitionsExchangeFuture.java        |   8 -
 .../distributed/CacheExchangeMergeTest.java     |  92 +---
 11 files changed, 27 insertions(+), 678 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9d0c46bd/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java 
b/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
deleted file mode 100644
index 38aad97..0000000
--- a/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
+++ /dev/null
@@ -1,541 +0,0 @@
-package org.apache.ignite;/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.ignite.internal.processors.cache.CacheObject;
-import org.apache.ignite.internal.processors.cache.GridCacheMapEntry;
-import org.apache.ignite.internal.processors.cache.KeyCacheObject;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.internal.CU;
-import org.apache.ignite.internal.util.typedef.internal.U;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-import java.util.Set;
-
-/**
- * TODO
- if (!cacheMsg.partitionExchangeMessage() && !(cacheMsg instanceof 
GridDhtPartitionDemandMessage) && !(cacheMsg instanceof 
GridDhtPartitionSupplyMessage))
- TestDebugLog.addMessage("Message: " + cacheMsg);
- */
-public class TestDebugLog1 {
-    public static volatile boolean DEBUG;
-
-    public static void debugLog(IgniteLogger log, String msg) {
-        if (DEBUG)
-            log.info(msg);
-    }
-
-    /** */
-    private static final List<Object> msgs = Collections.synchronizedList(new 
ArrayList<>(500_000));
-
-    /** */
-    private static final SimpleDateFormat DEBUG_DATE_FMT = new 
SimpleDateFormat("HH:mm:ss,SSS");
-
-    static class Message {
-        String thread = Thread.currentThread().getName();
-
-        String msg;
-
-        long ts = U.currentTimeMillis();
-
-        public Message(String msg) {
-            this.msg = msg;
-        }
-
-        public String toString() {
-            return "Msg [thread=" + thread + ", time=" + 
DEBUG_DATE_FMT.format(new Date(ts)) + ", msg=" + msg + ']';
-        }
-    }
-
-    static class PageMessage extends Message {
-        long pageId;
-
-        int bucket;
-
-        public PageMessage(String msg, long pageId, int bucket) {
-            super(msg);
-            this.bucket = bucket;
-            this.pageId = pageId;
-        }
-
-        public String toString() {
-            return "EntryMsg [pageId=" + pageId + ", bucket=" + bucket + ", 
msg=" + msg + ", thread=" + thread + ", time=" + DEBUG_DATE_FMT.format(new 
Date(ts)) + ']';
-        }
-    }
-
-    static class BucketMessage extends Message {
-        int bucket;
-
-        public BucketMessage(String msg, int bucket) {
-            super(msg);
-            this.bucket = bucket;
-        }
-
-        public String toString() {
-            return "BucketMsg [bucket=" + bucket + ", msg=" + msg + ", 
thread=" + thread + ", time=" + DEBUG_DATE_FMT.format(new Date(ts)) + ']';
-        }
-    }
-
-    static class EntryMessage extends Message {
-        Object key;
-        Object val;
-        int cacheId;
-
-        public EntryMessage(int cacheId, Object key, Object val, String msg) {
-            super(msg);
-
-            this.cacheId = cacheId;
-            this.key = key;
-            this.val = val;
-        }
-
-        public String toString() {
-            return "EntryMsg [key=" + key + ", msg=" + msg + ", thread=" + 
thread + ", time=" + DEBUG_DATE_FMT.format(new Date(ts)) +
-                    ", val=" + val +']';
-        }
-    }
-    static class PartMessage extends Message {
-        private final int cacheId;
-        private final int partId;
-        private Object val;
-
-        public PartMessage(int cacheId, int partId, Object val, String msg) {
-            super(msg);
-
-            this.cacheId = cacheId;
-            this.partId = partId;
-            this.val = val;
-            this.msg = msg;
-        }
-
-        boolean match(int cacheId, int partId) {
-            return this.cacheId == cacheId && this.partId == partId;
-        }
-
-        @Override public boolean equals(Object o) {
-            if (this == o) return true;
-            if (o == null || getClass() != o.getClass()) return false;
-
-            PartMessage partKey = (PartMessage) o;
-
-            if (cacheId != partKey.cacheId) return false;
-            return partId == partKey.partId;
-
-        }
-
-        @Override public int hashCode() {
-            int result = cacheId;
-            result = 31 * result + partId;
-            return result;
-        }
-
-        public String toString() {
-            return "PartMessage [partId=" + partId +
-                    ", val=" + val +
-                    ", msg=" + msg +
-                    ", thread=" + thread +
-                    ", time=" + DEBUG_DATE_FMT.format(new Date(ts)) +
-                    ", cacheId=" + cacheId + ']';
-        }
-    }
-
-    static class CacheMessage extends Message {
-        private final int cacheId;
-        private Object val;
-
-        public CacheMessage(int cacheId, Object val, String msg) {
-            super(msg);
-
-            this.cacheId = cacheId;
-            this.val = val;
-            this.msg = msg;
-        }
-
-        @Override public boolean equals(Object o) {
-            if (this == o) return true;
-            if (o == null || getClass() != o.getClass()) return false;
-
-            PartMessage partKey = (PartMessage) o;
-
-            if (cacheId != partKey.cacheId) return false;
-            return true;
-
-        }
-
-        @Override public int hashCode() {
-            int result = cacheId;
-            return result;
-        }
-
-        public String toString() {
-            return "CacheMessage [" +
-                    "val=" + val +
-                    ", msg=" + msg +
-                    ", thread=" + thread +
-                    ", time=" + DEBUG_DATE_FMT.format(new Date(ts)) +
-                    ", cacheId=" + cacheId + ']';
-        }
-    }
-
-    static final boolean out = false;
-
-    public static void addPageMessage(long pageId, String msg) {
-        //msgs.add(new PageMessage(msg, pageId, -1));
-    }
-
-    public static void addBucketMessage(int bucket, String msg) {
-        //msgs.add(new BucketMessage(msg, bucket));
-    }
-
-    public static void addPageMessage(long pageId, int bucket, String msg) {
-        //msgs.add(new PageMessage(msg, pageId, bucket));
-    }
-
-    static final boolean disabled = false;
-
-    public static void addMessage(String msg) {
-        if (disabled)
-            return;
-
-        msgs.add(new Message(msg));
-
-        if (out)
-            System.out.println(msg);
-    }
-
-    public static void addCacheMessage(int cacheId, Object val, String msg) {
-        msgs.add(new CacheMessage(cacheId, val, msg));
-    }
-
-    public static void addCacheEntryMessage(GridCacheMapEntry e, CacheObject 
val, String msg) {
-        addEntryMessage(e.context().cacheId(), 
e.key().value(e.context().cacheObjectContext(), false),
-                val != null ? val.value(e.context().cacheObjectContext(), 
false) : null, msg);
-    }
-
-    public static void addCacheEntryMessage(GridCacheMapEntry e, Object val, 
String msg) {
-        addEntryMessage(e.context().cacheId(), 
e.key().value(e.context().cacheObjectContext(), false), val, msg);
-    }
-
-    public static void addEntryMessage(int cacheId, Object key, Object val, 
String msg) {
-        //        if (!(val instanceof TcpDiscoveryHeartbeatMessage || val 
instanceof TcpDiscoveryCustomEventMessage || val instanceof 
TcpDiscoveryCustomEventMessage))
-//            return;
-
-//        if (val instanceof TcpDiscoveryHeartbeatMessage || val instanceof 
TcpDiscoveryCustomEventMessage || val instanceof TcpDiscoveryCustomEventMessage)
-//            return;
-//
-        if (disabled)
-            return;
-
-        if (key instanceof KeyCacheObject)
-            key = ((KeyCacheObject) key).value(null, false);
-
-        assert key != null;
-
-//        if (val instanceof CacheObject)
-//            val = ((CacheObject) val).value(null, false);
-
-        EntryMessage msg0 = new EntryMessage(cacheId, key, val, msg);
-
-        msgs.add(msg0);
-
-        if (out)
-            System.out.println(msg0.toString());
-    }
-
-    public static void printMessages(String fileName) {
-        List<Object> msgs0;
-
-        synchronized (msgs) {
-            msgs0 = new ArrayList<>(msgs);
-
-            // msgs.clear();
-        }
-
-        if (fileName != null) {
-            try {
-                FileOutputStream out = new FileOutputStream(fileName);
-
-                PrintWriter w = new PrintWriter(out);
-
-                for (Object msg : msgs0)
-                    w.println(msg.toString());
-
-                w.close();
-
-                out.close();
-            }
-            catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-        else {
-            for (Object msg : msgs0)
-                System.out.println(msg);
-        }
-    }
-
-    public static void addPartMessage(int cacheId,
-                                      int partId,
-                                      Object val,
-                                      String msg) {
-        msgs.add(new PartMessage(cacheId, partId, val, msg));
-    }
-
-    public static void printPartMessages(String fileName, int cacheId, int 
partId) {
-        List<Object> msgs0;
-
-        synchronized (msgs) {
-            msgs0 = new ArrayList<>(msgs);
-
-            //msgs.clear();
-        }
-
-        if (fileName != null) {
-            try {
-                FileOutputStream out = new FileOutputStream(fileName);
-
-                PrintWriter w = new PrintWriter(out);
-
-                for (Object msg : msgs0) {
-                    if (msg instanceof PartMessage && 
!((PartMessage)msg).match(cacheId, partId))
-                        continue;
-
-                    w.println(msg.toString());
-                }
-
-                w.close();
-
-                out.close();
-            }
-            catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-        else {
-            for (Object msg : msgs0) {
-                if (msg instanceof PartMessage && 
!((PartMessage)msg).match(cacheId, partId))
-                    continue;
-
-                System.out.println(msg);
-            }
-        }
-    }
-
-    public static void printPageMessages(String fileName, long pageId) {
-        List<Object> msgs0;
-
-        synchronized (msgs) {
-            msgs0 = new ArrayList<>(msgs);
-
-            //msgs.clear();
-        }
-
-        if (fileName != null) {
-            try {
-                FileOutputStream out = new FileOutputStream(fileName);
-
-                PrintWriter w = new PrintWriter(out);
-
-                for (Object msg : msgs0) {
-                    if (msg instanceof PageMessage && 
((PageMessage)msg).pageId != pageId)
-                        continue;
-
-                    w.println(msg.toString());
-                }
-
-                w.close();
-
-                out.close();
-            }
-            catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-        else {
-            for (Object msg : msgs0) {
-                if (msg instanceof PageMessage && ((PageMessage)msg).pageId != 
pageId)
-                    continue;
-
-                System.out.println(msg);
-            }
-        }
-    }
-
-    public static void printBucketMessages(String fileName, int bucketId) {
-        List<Object> msgs0;
-
-        synchronized (msgs) {
-            msgs0 = new ArrayList<>(msgs);
-
-            //msgs.clear();
-        }
-
-        try {
-            FileOutputStream out = new FileOutputStream(fileName);
-
-            PrintWriter w = new PrintWriter(out);
-
-            for (Object msg : msgs0) {
-                if (msg instanceof BucketMessage && 
((BucketMessage)msg).bucket != bucketId)
-                    continue;
-
-                w.println(msg.toString());
-            }
-
-            w.close();
-
-            out.close();
-        }
-        catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    public static void printKeyMessages(String fileName, Object key) {
-        printKeyMessages(fileName, Collections.singleton(key));
-    }
-
-    public static void printKeyMessages(String fileName, Set<Object> keys) {
-        assert !F.isEmpty(keys);
-
-        List<Object> msgs0;
-
-        synchronized (msgs) {
-            msgs0 = new ArrayList<>(msgs);
-
-            //msgs.clear();
-        }
-
-        if (fileName != null) {
-            try {
-                FileOutputStream out = new FileOutputStream(fileName);
-
-                PrintWriter w = new PrintWriter(out);
-
-                for (Object msg : msgs0) {
-                    if (msg instanceof EntryMessage && 
!(keys.contains(((EntryMessage)msg).key)))
-                        continue;
-
-                    w.println(msg.toString());
-                }
-
-                w.close();
-
-                out.close();
-            }
-            catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-        else {
-            for (Object msg : msgs0) {
-                if (msg instanceof EntryMessage && 
!(keys.contains(((EntryMessage)msg).key)))
-                    continue;
-
-                EntryMessage msg0 = (EntryMessage)msg;
-
-                if (msg0.val instanceof Exception) {
-                    System.out.print(msg0.thread + ", msg=" + msg0.msg + ", ");
-
-                    ((Exception)msg0.val).printStackTrace(System.out);
-                }
-                else
-                    System.out.println(msg);
-            }
-        }
-    }
-
-    public static void printKeyAndPartMessages(String fileName, Object key, 
int partId, int cacheId) {
-        fileName = null;
-
-        assert key != null;
-
-        List<Object> msgs0;
-
-        synchronized (msgs) {
-            msgs0 = new ArrayList<>(msgs);
-
-            //msgs.clear();
-        }
-
-        if (fileName != null) {
-            try {
-                FileOutputStream out = new FileOutputStream(fileName);
-
-                PrintWriter w = new PrintWriter(out);
-
-                for (Object msg : msgs0) {
-                    if (msg instanceof EntryMessage && 
!((EntryMessage)msg).key.equals(key))
-                        continue;
-
-                    if (msg instanceof PartMessage) {
-                        PartMessage pm = (PartMessage)msg;
-
-                        if (pm.cacheId != cacheId || pm.partId != partId)
-                            continue;
-                    }
-
-                    w.println(msg.toString());
-                }
-
-                w.close();
-
-                out.close();
-            }
-            catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-        else {
-            for (Object msg : msgs0) {
-                if (msg instanceof EntryMessage) {
-                    EntryMessage em = (EntryMessage)msg;
-
-                    if (em.cacheId != cacheId || !em.key.equals(key))
-                        continue;
-                }
-                else if (msg instanceof PartMessage) {
-                    PartMessage pm = (PartMessage)msg;
-
-                    if (pm.cacheId != cacheId || pm.partId != partId)
-                        continue;
-                } else if (msg instanceof CacheMessage) {
-                    CacheMessage em = (CacheMessage)msg;
-
-                    if (em.cacheId != cacheId)
-                        continue;
-                }
-
-
-                System.out.println(msg);
-            }
-        }
-    }
-
-    public static void clear() {
-        msgs.clear();
-    }
-
-    public static void main(String[] args) {
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d0c46bd/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
index 139ff85..34e2b0a 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
@@ -35,7 +35,6 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.IgniteSystemProperties;
-import org.apache.ignite.TestDebugLog1;
 import org.apache.ignite.cache.affinity.AffinityCentralizedFunction;
 import org.apache.ignite.cache.affinity.AffinityFunction;
 import org.apache.ignite.cluster.ClusterNode;
@@ -232,13 +231,6 @@ public class GridAffinityAssignmentCache {
                 + ", topVer=" + topVer
                 + ", aff=" + fold(affAssignment) + "]");
         }
-
-        debugAssignment("init " + topVer, affAssignment);
-    }
-
-    private void debugAssignment(String msg, List<List<ClusterNode>> 
affAssignment) {
-        for (int i = 0; i < partsCnt; i++)
-            TestDebugLog1.addPartMessage(grpId, i, 
U.nodeIds(affAssignment.get(i)), msg);
     }
 
     /**
@@ -407,8 +399,6 @@ public class GridAffinityAssignmentCache {
         if (locCache)
             initialize(topVer, assignment);
 
-        debugAssignment("calc " + topVer, assignment);
-
         return assignment;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d0c46bd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 814bb3d..03f6d11 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -33,7 +33,6 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.TestDebugLog1;
 import org.apache.ignite.cache.eviction.EvictableEntry;
 import org.apache.ignite.internal.NodeStoppingException;
 import org.apache.ignite.internal.pagemem.wal.StorageException;
@@ -1040,8 +1039,6 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
             if (tx != null && cctx.group().persistenceEnabled() && 
cctx.group().walEnabled())
                 logPtr = logTxUpdate(tx, val, expireTime, updateCntr0);
 
-            TestDebugLog1.addCacheEntryMessage(this, val, "innerSet");
-
             update(val, expireTime, ttl, newVer, true);
 
             drReplicate(drType, val, newVer, topVer);
@@ -1720,8 +1717,6 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
         lockEntry();
 
         try {
-            TestDebugLog1.addCacheEntryMessage(this, val, "innerUpdate");
-
             checkObsolete();
 
             boolean internal = isInternal() || !context().userCache();
@@ -2711,8 +2706,6 @@ public abstract class GridCacheMapEntry extends 
GridMetadataAwareAdapter impleme
         lockEntry();
 
         try {
-            TestDebugLog1.addCacheEntryMessage(this, val, "initialVal");
-
             checkObsolete();
 
             boolean walEnabled = !cctx.isNear() && 
cctx.group().persistenceEnabled() && cctx.group().walEnabled();

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d0c46bd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
index 2c43342..fe02090 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
@@ -24,7 +24,6 @@ import java.util.Collections;
 import java.util.List;
 import java.util.UUID;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.TestDebugLog1;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
@@ -649,10 +648,6 @@ public class GridDhtCacheEntry extends 
GridDistributedCacheEntry {
                     ']');
             }
 
-
-            TestDebugLog1.addCacheEntryMessage(this, val, "clear");
-
-
             removeValue();
 
             // Give to GC.

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d0c46bd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index 06648846..e13c952 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -31,7 +31,6 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.IgniteSystemProperties;
-import org.apache.ignite.TestDebugLog1;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.IgniteFutureTimeoutCheckedException;
 import org.apache.ignite.internal.IgniteInternalFuture;
@@ -542,15 +541,8 @@ public class GridDhtLocalPartition extends 
GridCacheConcurrentMapImpl implements
                 return update;
             }
         }
-        else {
-            if (this.state.compareAndSet(state, setPartState(state, toState))) 
{
-                TestDebugLog1.addPartMessage(grp.groupId(), id, toState, "set 
state");
-                return  true;
-            }
-            else {
-                return false;
-            }
-        }
+        else
+            return this.state.compareAndSet(state, setPartState(state, 
toState));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d0c46bd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
index d7bf2ab..1d1e1d8 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
@@ -34,7 +34,6 @@ import java.util.stream.Collectors;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.TestDebugLog1;
 import org.apache.ignite.cache.PartitionLossPolicy;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.events.DiscoveryEvent;
@@ -1943,11 +1942,6 @@ public class GridDhtPartitionTopologyImpl implements 
GridDhtPartitionTopology {
         }
 
         diffFromAffinityVer = affAssignment.topologyVersion();
-
-        for (int i= 0; i < partitions(); i++) {
-            Set<UUID> diff = diffFromAffinity.get(i);
-            TestDebugLog1.addPartMessage(grp.groupId(), i, diff, "diff " + 
diffFromAffinityVer);
-        }
     }
 
     /** {@inheritDoc} */
@@ -2797,8 +2791,6 @@ public class GridDhtPartitionTopologyImpl implements 
GridDhtPartitionTopology {
                     return;
             }
 
-            TestDebugLog1.addCacheMessage(grp.groupId(), readyTopVer, 
"rebalanced");
-
             rebalancedTopVer = readyTopVer;
 
             if (log.isDebugEnabled())

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d0c46bd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
index a57ff20..e0aea9a 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
@@ -23,7 +23,6 @@ import java.util.UUID;
 import java.util.concurrent.atomic.AtomicReference;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.TestDebugLog1;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.IgniteDiagnosticAware;
 import org.apache.ignite.internal.IgniteDiagnosticPrepareContext;
@@ -309,8 +308,6 @@ public class GridPartitionedSingleGetFuture extends 
GridCacheFutureAdapter<Objec
                 recovery);
 
             try {
-                TestDebugLog1.addEntryMessage(cctx.cacheId(), key, node.id(), 
"snd req");
-
                 cctx.io().send(node, req, cctx.ioPolicy());
             }
             catch (IgniteCheckedException e) {
@@ -331,8 +328,6 @@ public class GridPartitionedSingleGetFuture extends 
GridCacheFutureAdapter<Objec
 
         List<ClusterNode> affNodes = cctx.affinity().nodesByPartition(part, 
topVer);
 
-        TestDebugLog1.addEntryMessage(cctx.cacheId(), key, 
U.nodeIds(affNodes), "get map " + topVer);
-
         if (affNodes.isEmpty()) {
             onDone(serverNotFoundError(topVer));
 
@@ -369,8 +364,6 @@ public class GridPartitionedSingleGetFuture extends 
GridCacheFutureAdapter<Objec
      * @return {@code True} if future completed.
      */
     private boolean localGet(AffinityTopologyVersion topVer, int part) {
-        TestDebugLog1.addEntryMessage(cctx.cacheId(), key, topVer, "local 
get");
-
         assert cctx.affinityNode() : this;
 
         GridDhtCacheAdapter colocated = cctx.dht();
@@ -508,8 +501,6 @@ public class GridPartitionedSingleGetFuture extends 
GridCacheFutureAdapter<Objec
      * @param res Result.
      */
     public void onResult(UUID nodeId, GridNearSingleGetResponse res) {
-        TestDebugLog1.addEntryMessage(cctx.cacheId(), key, nodeId, "get res " 
+ topVer);
-
         if (!processResponse(nodeId) ||
             !checkError(res.error(), res.invalidPartitions(), 
res.topologyVersion(), nodeId))
             return;
@@ -551,8 +542,6 @@ public class GridPartitionedSingleGetFuture extends 
GridCacheFutureAdapter<Objec
      * @param res Result.
      */
     @Override public void onResult(UUID nodeId, GridNearGetResponse res) {
-        TestDebugLog1.addEntryMessage(cctx.cacheId(), key, nodeId, "get res2 " 
+ topVer);
-
         if (!processResponse(nodeId) ||
             !checkError(res.error(), !F.isEmpty(res.invalidPartitions()), 
res.topologyVersion(), nodeId))
             return;
@@ -729,8 +718,6 @@ public class GridPartitionedSingleGetFuture extends 
GridCacheFutureAdapter<Objec
 
     /** {@inheritDoc} */
     @Override public boolean onNodeLeft(UUID nodeId) {
-        TestDebugLog1.addEntryMessage(cctx.cacheId(), key, nodeId, "node 
left");
-
         if (!processResponse(nodeId))
             return false;
 
@@ -760,8 +747,6 @@ public class GridPartitionedSingleGetFuture extends 
GridCacheFutureAdapter<Objec
      * @param topVer Topology version.
      */
     private void remap(final AffinityTopologyVersion topVer) {
-        TestDebugLog1.addEntryMessage(cctx.cacheId(), key, topVer, "remap");
-
         cctx.closures().runLocalSafe(new Runnable() {
             @Override public void run() {
                 map(topVer);

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d0c46bd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
index 8b7ce78..e8824e7 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
@@ -27,7 +27,6 @@ import java.util.concurrent.atomic.AtomicReference;
 import javax.cache.processor.EntryProcessor;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.TestDebugLog1;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.IgniteInternalFuture;
@@ -186,8 +185,6 @@ public abstract class GridDhtAtomicAbstractUpdateFuture 
extends GridCacheFutureA
         if (dhtNodes == null)
             dhtNodes = affNodes;
 
-        TestDebugLog1.addCacheEntryMessage(entry, U.nodeIds(dhtNodes), "dht 
map " + topVer + " " + updateReq.affinityMapping());
-
         if (log.isDebugEnabled())
             log.debug("Mapping entry to DHT nodes [nodes=" + 
U.nodeIds(dhtNodes) + ", entry=" + entry + ']');
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d0c46bd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
index 2c6ea21..b2f9218 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
@@ -23,7 +23,6 @@ import java.util.Map;
 import java.util.UUID;
 import javax.cache.expiry.ExpiryPolicy;
 import javax.cache.processor.EntryProcessor;
-import org.apache.ignite.TestDebugLog1;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.IgniteInternalFuture;
@@ -47,7 +46,6 @@ import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_ASYNC;
@@ -568,8 +566,6 @@ public class GridNearAtomicSingleUpdateFuture extends 
GridNearAtomicAbstractUpda
 
         boolean needPrimaryRes = !mappingKnown || primary.isLocal() || 
nodes.size() == 1 || nearEnabled;
 
-        TestDebugLog1.addEntryMessage(cctx.cacheId(), key, U.nodeIds(nodes), 
"map " + topVer + " " + mappingKnown);
-
         GridNearAtomicAbstractUpdateRequest req;
 
         byte flags = GridNearAtomicAbstractUpdateRequest.flags(nearEnabled,

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d0c46bd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index faedc0a..4d0b583 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -40,7 +40,6 @@ import java.util.concurrent.locks.ReadWriteLock;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.IgniteSystemProperties;
-import org.apache.ignite.TestDebugLog1;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheRebalanceMode;
 import org.apache.ignite.cluster.ClusterNode;
@@ -661,13 +660,6 @@ public class GridDhtPartitionsExchangeFuture extends 
GridDhtTopologyFutureAdapte
                     ", evtNode=" + firstDiscoEvt.eventNode().id() +
                     ", customEvt=" + (firstDiscoEvt.type() == 
EVT_DISCOVERY_CUSTOM_EVT ? 
((DiscoveryCustomEvent)firstDiscoEvt).customMessage() : null) +
                     ", allowMerge=" + exchCtx.mergeExchanges() + ']');
-
-                TestDebugLog1.addMessage("Started exchange init [topVer=" + 
topVer +
-                        ", crd=" + crdNode +
-                        ", evt=" + 
IgniteUtils.gridEventName(firstDiscoEvt.type()) +
-                        ", evtNode=" + firstDiscoEvt.eventNode().id() +
-                        ", customEvt=" + (firstDiscoEvt.type() == 
EVT_DISCOVERY_CUSTOM_EVT ? 
((DiscoveryCustomEvent)firstDiscoEvt).customMessage() : null) +
-                        ", allowMerge=" + exchCtx.mergeExchanges() + ']');
             }
 
             ExchangeType exchange;

http://git-wip-us.apache.org/repos/asf/ignite/blob/9d0c46bd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
index d17fca4..16eeb06 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
@@ -31,18 +31,14 @@ import java.util.concurrent.Future;
 import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
-import junit.framework.AssertionFailedError;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteSystemProperties;
-import org.apache.ignite.TestDebugLog1;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.cluster.ClusterTopologyException;
 import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.DataRegionConfiguration;
-import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.events.DiscoveryEvent;
 import org.apache.ignite.events.Event;
@@ -66,7 +62,6 @@ import 
org.apache.ignite.internal.util.future.GridCompoundFuture;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.G;
 import org.apache.ignite.internal.util.typedef.PA;
-import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.lang.IgniteBiPredicate;
 import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.lang.IgnitePredicate;
@@ -125,10 +120,6 @@ public class CacheExchangeMergeTest extends 
GridCommonAbstractTest {
     @Override protected IgniteConfiguration getConfiguration(String 
igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
-        DataStorageConfiguration cfg1 = new DataStorageConfiguration();
-        cfg1.setDefaultDataRegionConfiguration(new 
DataRegionConfiguration().setMaxSize(128 * 1024 * 1024));
-        cfg.setDataStorageConfiguration(cfg1);
-
         ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
 
         if (testSpi)
@@ -278,8 +269,6 @@ public class CacheExchangeMergeTest extends 
GridCommonAbstractTest {
         }
         finally {
             
System.clearProperty(IgniteSystemProperties.IGNITE_EXCHANGE_MERGE_DELAY);
-
-            TestDebugLog1.clear();
         }
     }
 
@@ -303,8 +292,6 @@ public class CacheExchangeMergeTest extends 
GridCommonAbstractTest {
      */
     private void concurrentStart(final boolean withClients) throws Exception {
         for (int i = 0; i < 5; i++) {
-            TestDebugLog1.clear();
-
             log.info("Iteration: " + i);
 
             startGrid(0);
@@ -667,51 +654,32 @@ public class CacheExchangeMergeTest extends 
GridCommonAbstractTest {
 
                         Object val = cache.get(key);
 
-                        try {
-                            assertEquals(err, i, val);
-                        } catch (AssertionFailedError err0) {
-                            synchronized (TestDebugLog1.class) {
-                                err0.printStackTrace(System.out);
-                                TestDebugLog1.addMessage("0 " + 
err0.getMessage());
-                                
TestDebugLog1.printKeyAndPartMessages("test_debug.txt", key, 
node.affinity(cacheName).partition(key), CU.cacheId(cacheName));
-                                System.exit(1);
-                            }
+                        assertEquals(err, i, val);
+                    }
+
+                    for (int i = 0; i < 5; i++) {
+                        Map<Integer, Integer> map = new TreeMap<>();
+
+                        for (int j = 0; j < 10; j++) {
+                            Integer key = rnd.nextInt(20_000);
+
+                            map.put(key, i);
                         }
+
+                        cache.putAll(map);
+
+                        Map<Object, Object> res = cache.getAll(map.keySet());
+
+                        for (Map.Entry<Integer, Integer> e : map.entrySet())
+                            assertEquals(err, e.getValue(), 
res.get(e.getKey()));
                     }
 
-//                    for (int i = 0; i < 5; i++) {
-//                        Map<Integer, Integer> map = new TreeMap<>();
-//
-//                        for (int j = 0; j < 10; j++) {
-//                            Integer key = rnd.nextInt(20_000);
-//
-//                            map.put(key, i);
-//                        }
-//
-//                        cache.putAll(map);
-//
-//                        Map<Object, Object> res = cache.getAll(map.keySet());
-//
-//                        for (Map.Entry<Integer, Integer> e : map.entrySet()) 
{
-//                            try {
-//                                assertEquals(err, e.getValue(), 
res.get(e.getKey()));
-//                            } catch (AssertionFailedError err0) {
-//                                synchronized (TestDebugLog1.class) {
-//                                    err0.printStackTrace(System.out);
-//                                    TestDebugLog1.addMessage("1 " + 
err0.getMessage());
-//                                    
TestDebugLog1.printKeyAndPartMessages("test_debug.txt", e.getKey(), 
node.affinity(cacheName).partition(e.getKey()), CU.cacheId(cacheName));
-//                                    System.exit(1);
-//                                }
-//                            }
-//                        }
-//                    }
-//
-//                    if 
(cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == 
TRANSACTIONAL) {
-//                        for (TransactionConcurrency concurrency : 
TransactionConcurrency.values()) {
-//                            for (TransactionIsolation isolation : 
TransactionIsolation.values())
-//                                checkNodeCaches(err, node, cache, 
concurrency, isolation);
-//                        }
-//                    }
+                    if 
(cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == 
TRANSACTIONAL) {
+                        for (TransactionConcurrency concurrency : 
TransactionConcurrency.values()) {
+                            for (TransactionIsolation isolation : 
TransactionIsolation.values())
+                                checkNodeCaches(err, node, cache, concurrency, 
isolation);
+                        }
+                    }
                 }
             }));
         }
@@ -760,18 +728,8 @@ public class CacheExchangeMergeTest extends 
GridCommonAbstractTest {
             return;
         }
 
-        for (Map.Entry<Object, Object> e : map.entrySet()) {
-            try {
-                assertEquals(err + " " + concurrency + " " + isolation, 
e.getValue(), cache.get(e.getKey()));
-            } catch (AssertionFailedError err0) {
-                synchronized (TestDebugLog1.class) {
-                    err0.printStackTrace(System.out);
-                    TestDebugLog1.addMessage("2 " + 
node.cluster().localNode().id() + " " + err0.getMessage());
-                    TestDebugLog1.printKeyAndPartMessages("test_debug.txt", 
e.getKey(), node.affinity(cache.getName()).partition(e.getKey()), 
CU.cacheId(cache.getName()));
-                    System.exit(1);
-                }
-            }
-        }
+        for (Map.Entry<Object, Object> e : map.entrySet())
+            assertEquals(err, e.getValue(), cache.get(e.getKey()));
     }
 
     /**

Reply via email to