ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [57/57] [abbrv] ignite git commit: Debugging .NET
Date Wed, 12 Apr 2017 07:34:28 GMT
Debugging .NET


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

Branch: refs/heads/ignite-3477-debug
Commit: 0ff3e9a8dcf6f20a251e9a674c952468e880e6f9
Parents: 3c5f342
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Wed Apr 12 10:33:39 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Wed Apr 12 10:33:39 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/database/freelist/FreeListImpl.java    | 3 +++
 .../processors/cache/database/tree/io/DataPageIO.java       | 9 +++++++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0ff3e9a8/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 cb68f7b..3ca5478 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,6 +188,9 @@ 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)) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ff3e9a8/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 9546890..5d82be6 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,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ 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;
 
 /**
@@ -136,6 +138,11 @@ public class DataPageIO extends PageIO {
     private int getPageEntrySize(long pageAddr, int dataOff, int show) {
         int payloadLen = PageUtils.getShort(pageAddr, dataOff) & 0xFFFF;
 
+        if (payloadLen <=0) {
+            U.debug("!!!! Invalid payload len [pageAddr=" + U.hexLong(pageAddr) + ", dataOff="
+ dataOff +
+                ", page=" + printPageLayout(pageAddr, MemoryConfiguration.DFLT_PAGE_SIZE));
+        }
+
         if ((payloadLen & FRAGMENTED_FLAG) != 0)
             payloadLen &= ~FRAGMENTED_FLAG; // We are fragmented and have a link.
         else
@@ -791,6 +798,8 @@ public class DataPageIO extends PageIO {
         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) + ']');
     }
 
     /**


Mime
View raw message