ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [34/50] [abbrv] ignite git commit: IGNITE-6466 Fixed testGetForInitialWrite - Fixes #2721.
Date Fri, 13 Oct 2017 17:43:19 GMT
IGNITE-6466 Fixed testGetForInitialWrite - Fixes #2721.

Signed-off-by: Alexey Goncharuk <alexey.goncharuk@gmail.com>


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

Branch: refs/heads/ignite-2.1.5-p1
Commit: 98afbfdab47112cbae722a7317d1af39472e1f88
Parents: 1ccdc97
Author: dpavlov <dpavlov@gridgain.com>
Authored: Fri Sep 22 13:47:14 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Fri Sep 22 13:49:44 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/persistence/tree/io/DataPageIO.java       | 6 +++---
 .../internal/processors/cache/persistence/tree/io/PageIO.java  | 2 +-
 .../IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java   | 4 +++-
 3 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/98afbfda/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/DataPageIO.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/DataPageIO.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/DataPageIO.java
index e6876a1..628ff38 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/DataPageIO.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/DataPageIO.java
@@ -68,8 +68,8 @@ public class DataPageIO extends PageIO {
     /** */
     private static final int FIRST_ENTRY_OFF = INDIRECT_CNT_OFF + 1;
 
-    /** */
-    private static final int ITEMS_OFF = FIRST_ENTRY_OFF + 2;
+    /** Offset of items (internal page pointers) within data page */
+    public static final int ITEMS_OFF = FIRST_ENTRY_OFF + 2;
 
     /** */
     private static final int ITEM_SIZE = 2;
@@ -1445,7 +1445,7 @@ public class DataPageIO extends PageIO {
     /** {@inheritDoc} */
     @Override protected void printPage(long addr, int pageSize, GridStringBuilder sb) throws
IgniteCheckedException {
         sb.a("DataPageIO [\n");
-        printPageLayout(addr, 0, sb);
+        printPageLayout(addr, pageSize, sb);
         sb.a("\n]");
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/98afbfda/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/PageIO.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/PageIO.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/PageIO.java
index 57339a1..b51a934 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/PageIO.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/PageIO.java
@@ -550,7 +550,7 @@ public abstract class PageIO {
 
     /**
      * @param addr Address.
-     * @param pageSize
+     * @param pageSize Page size.
      * @param sb Sb.
      */
     protected abstract void printPage(long addr, int pageSize, GridStringBuilder sb) throws
IgniteCheckedException ;

http://git-wip-us.apache.org/repos/asf/ignite/blob/98afbfda/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
index 297e69f..2278981 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
@@ -235,8 +235,10 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends
GridCom
                     try {
                         DataPageIO.VERSIONS.latest().initNewPage(pageAddr, fullId.pageId(),
mem.pageSize());
 
-                        for (int i = PageIO.COMMON_HEADER_END; i < mem.pageSize(); i++)
+                        for (int i = PageIO.COMMON_HEADER_END + DataPageIO.ITEMS_OFF; i <
mem.pageSize(); i++)
                             PageUtils.putByte(pageAddr, i, (byte)0xAB);
+
+                        PageIO.printPage(pageAddr, mem.pageSize());
                     }
                     finally {
                         mem.writeUnlock(fullId.groupId(), fullId.pageId(), page, null, true);


Mime
View raw message