ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: .NET - Removing debug
Date Thu, 13 Apr 2017 11:17:16 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-3477-debug 28467084c -> bcb02d5c7


.NET - Removing debug


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

Branch: refs/heads/ignite-3477-debug
Commit: bcb02d5c7dbf42f8e5ff67dd2d9886fbd62d1c1a
Parents: 2846708
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Thu Apr 13 14:17:46 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Thu Apr 13 14:17:46 2017 +0300

----------------------------------------------------------------------
 .../ignite/internal/binary/BinaryUtils.java     | 11 +----
 .../cache/database/freelist/FreeListImpl.java   |  5 --
 .../cache/database/tree/io/DataPageIO.java      | 48 ++------------------
 .../platform/cache/PlatformCache.java           |  7 +--
 .../ignite/spi/discovery/tcp/ServerImpl.java    |  3 --
 5 files changed, 8 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bcb02d5c/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
index d6219b6..f89a18c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
@@ -1795,8 +1795,6 @@ public class BinaryUtils {
 
                 int len = length(in, start);
 
-                U.debug("Read binary object length: " + len + ", start=" + start);
-
                 BinaryObjectExImpl po;
 
                 if (detach) {
@@ -1804,8 +1802,6 @@ public class BinaryUtils {
                     in.position(start);
 
                     po = new BinaryObjectImpl(ctx, in.readByteArray(len), 0);
-
-                    U.debug("Read binary object: " + po);
                 }
                 else {
                     if (in.offheapPointer() == 0)
@@ -1915,11 +1911,8 @@ public class BinaryUtils {
             case GridBinaryMarshaller.MAP:
                 return doReadMap(in, ctx, ldr, handles, false, null);
 
-            case GridBinaryMarshaller.BINARY_OBJ: {
-                BinaryObject binObj0 = doReadBinaryObject(in, ctx, detach);
-
-                return binObj0;
-            }
+            case GridBinaryMarshaller.BINARY_OBJ:
+                return doReadBinaryObject(in, ctx, detach);
 
             case GridBinaryMarshaller.ENUM:
                 return doReadBinaryEnum(in, ctx, doReadEnumType(in));

http://git-wip-us.apache.org/repos/asf/ignite/blob/bcb02d5c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
index 5b6448d..cb68f7b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
@@ -188,9 +188,6 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList
{
             CacheDataRow row,
             int rowSize
         ) throws IgniteCheckedException {
-            U.debug("Adding row [pageAddr=" + U.hexLong(pageAddr) + ", row=" + row + ", rowSize="
+ rowSize +
-                ", pageSize=" + pageSize() + ']');
-
             io.addRow(pageAddr, row, rowSize, pageSize());
 
             if (needWalDeltaRecord(pageId, page, null)) {
@@ -457,8 +454,6 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList
{
     @Override public void insertDataRow(CacheDataRow row) throws IgniteCheckedException {
         int rowSize = getRowSize(row);
 
-        U.debug("Row size for insert: " + rowSize + ", row=" + row);
-
         int written = 0;
 
         do {

http://git-wip-us.apache.org/repos/asf/ignite/blob/bcb02d5c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
index 29280ea..80154d1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
@@ -24,7 +24,6 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.configuration.MemoryConfiguration;
 import org.apache.ignite.internal.pagemem.PageIdUtils;
 import org.apache.ignite.internal.pagemem.PageMemory;
 import org.apache.ignite.internal.pagemem.PageUtils;
@@ -33,7 +32,6 @@ import org.apache.ignite.internal.processors.cache.database.CacheDataRow;
 import org.apache.ignite.internal.processors.cache.database.tree.util.PageHandler;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.util.typedef.internal.SB;
-import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -135,29 +133,15 @@ public class DataPageIO extends PageIO {
      * @param show What elements of data page entry to show in the result.
      * @return Data page entry size.
      */
-    private int getPageEntrySize(long pageAddr, int dataOff, int show, boolean check) {
+    private int getPageEntrySize(long pageAddr, int dataOff, int show) {
         int payloadLen = PageUtils.getShort(pageAddr, dataOff) & 0xFFFF;
 
-        int payloadLen0 = payloadLen;
-
         if ((payloadLen & FRAGMENTED_FLAG) != 0)
             payloadLen &= ~FRAGMENTED_FLAG; // We are fragmented and have a link.
         else
             show &= ~SHOW_LINK; // We are not fragmented, never have a link.
 
-        try {
-            return getPageEntrySize(payloadLen, show, check);
-        }
-        catch (AssertionError e) {
-            U.debug("Failed [pageAddr=" + U.hexLong(pageAddr) + ", dataOff=" + dataOff +
", show=" + show +
-                ", payloadLen0=" + payloadLen0 + ", payloadLen=" + payloadLen + ']');
-
-            throw e;
-        }
-    }
-
-    private int getPageEntrySize(long pageAddr, int dataOff, int show) {
-        return getPageEntrySize(pageAddr, dataOff, show, true);
+        return getPageEntrySize(payloadLen, show);
     }
 
     /**
@@ -165,8 +149,8 @@ public class DataPageIO extends PageIO {
      * @param show What elements of data page entry to show in the result.
      * @return Data page entry size.
      */
-    private int getPageEntrySize(int payloadLen, int show, boolean check) {
-        assert !check || payloadLen > 0 : payloadLen;
+    private int getPageEntrySize(int payloadLen, int show) {
+        assert payloadLen > 0 : payloadLen;
 
         int res = payloadLen;
 
@@ -183,15 +167,6 @@ public class DataPageIO extends PageIO {
     }
 
     /**
-     * @param payloadLen Length of the payload, may be a full data row or a row fragment
length.
-     * @param show What elements of data page entry to show in the result.
-     * @return Data page entry size.
-     */
-    private int getPageEntrySize(int payloadLen, int show) {
-        return getPageEntrySize(payloadLen, show, true);
-    }
-
-    /**
      * @param pageAddr Page address.
      * @param dataOff Entry data offset.
      * @param pageSize Page size.
@@ -398,7 +373,7 @@ public class DataPageIO extends PageIO {
             if (item < ITEMS_OFF || item >= pageSize)
                 valid = false;
 
-            entriesSize += getPageEntrySize(pageAddr, item, SHOW_PAYLOAD_LEN | SHOW_LINK,
false);
+            entriesSize += getPageEntrySize(pageAddr, item, SHOW_PAYLOAD_LEN | SHOW_LINK);
 
             b.a(item);
             b.a("{").a(entriesSize).a("}");
@@ -806,8 +781,6 @@ public class DataPageIO extends PageIO {
         final int rowSize,
         final int pageSize
     ) throws IgniteCheckedException {
-        U.debug("Before addRow [pageAddr=" + U.hexLong(pageAddr) + ", page=" + printPageLayout(pageAddr,
MemoryConfiguration.DFLT_PAGE_SIZE) + ']');
-
         assert rowSize <= getFreeSpace(pageAddr): "can't call addRow if not enough space
for the whole row";
 
         int fullEntrySize = getPageEntrySize(rowSize, SHOW_PAYLOAD_LEN | SHOW_ITEM);
@@ -817,15 +790,11 @@ public class DataPageIO extends PageIO {
 
         int dataOff = getDataOffsetForWrite(pageAddr, fullEntrySize, directCnt, indirectCnt,
pageSize);
 
-        U.debug("Going to write data at offset: " + dataOff);
-
         writeRowData(pageAddr, dataOff, rowSize, row, true);
 
         int itemId = addItem(pageAddr, fullEntrySize, directCnt, indirectCnt, dataOff, pageSize);
 
         setLink(row, pageAddr, itemId);
-
-        U.debug("After addRow [pageAddr=" + U.hexLong(pageAddr) + ", page=" + printPageLayout(pageAddr,
MemoryConfiguration.DFLT_PAGE_SIZE) + ']');
     }
 
     /**
@@ -906,8 +875,6 @@ public class DataPageIO extends PageIO {
         assert checkIndex(itemId): itemId;
         assert getIndirectCount(pageAddr) <= getDirectCount(pageAddr);
 
-        U.debug("After insertItem: " + printPageLayout(pageAddr, MemoryConfiguration.DFLT_PAGE_SIZE));
-
         // Update free space. If number of indirect items changed, then we were able to reuse
an item slot.
         setRealFreeSpace(pageAddr,
             getRealFreeSpace(pageAddr) - fullEntrySize + (getIndirectCount(pageAddr) != indirectCnt
? ITEM_SIZE : 0),
@@ -1451,11 +1418,6 @@ public class DataPageIO extends PageIO {
         addr += CacheVersionIO.size(row.version(), false);
 
         PageUtils.putLong(addr, 0, row.expireTime());
-
-        addr += 8;
-
-        U.debug("Finished writing [endPos=" + (addr - pageAddr) + ", row=" + row + ", payloadSize="
+ payloadSize +
-            ", dataOff=" + dataOff + ", newRow=" + newRow + ']');
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/bcb02d5c/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
index 0f1f868..dea16e6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
@@ -403,12 +403,7 @@ public class PlatformCache extends PlatformAbstractTarget {
         try {
             switch (type) {
                 case OP_PUT:
-                    Object key0 = reader.readObjectDetached();
-                    Object val0 = reader.readObjectDetached();
-
-                    U.debug("Read object for put: " + val0 + ", reader=" + reader);
-
-                    cache.put(key0, val0);
+                    cache.put(reader.readObjectDetached(), reader.readObjectDetached());
 
                     return TRUE;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/bcb02d5c/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 3be440a..47c13e1 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -4653,9 +4653,6 @@ class ServerImpl extends TcpDiscoveryImpl {
             }
 
             if (msg.verified()) {
-                if (locNode.id().equals(failedNodeId))
-                    U.debug(log, ">>>>>>> received self-kill message:
" + msg);
-
                 failedNode = ring.removeNode(failedNodeId);
 
                 interruptPing(failedNode);


Mime
View raw message