ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: tmp
Date Mon, 13 Feb 2017 10:09:48 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-3477-compact2 328cddc2c -> e6236f005


tmp


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

Branch: refs/heads/ignite-3477-compact2
Commit: e6236f00519691dc26e52c4329fccb49038c1235
Parents: 328cddc
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Feb 13 13:09:28 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Feb 13 13:09:28 2017 +0300

----------------------------------------------------------------------
 .../cache/database/tree/io/DataPageIO.java      | 24 ++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e6236f00/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 d9b4117..8dc3561 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
@@ -71,7 +71,7 @@ public class DataPageIO extends PageIO {
     private static final int REMOVED_ITEMS_OFF = REMOVED_CNT_OFF + 1;
 
     /** */
-    private static final int MAX_REMOVED_CNT = 8;
+    private static final int MAX_REMOVED_CNT = 4;
 
     /** */
     private static final int REMOVED_ITEM_SIZE = 4;
@@ -715,6 +715,22 @@ public class DataPageIO extends PageIO {
                     PageUtils.putInt(pageAddr, REMOVED_ITEMS_OFF + rmvdCnt * REMOVED_ITEM_SIZE,
item);
 
                     setRemovedCount(pageAddr, rmvdCnt + 1);
+                } else if (false) {
+                    int rmvdItemOff = REMOVED_ITEMS_OFF;
+
+                    for (int i = 0; i < MAX_REMOVED_CNT; i++) {
+                        int rmvdItem = PageUtils.getInt(pageAddr, rmvdItemOff);
+                        int size = rmvdItem & 0xFFFF;
+
+                        if (rmvEntrySize > size) {
+                            int item = dataOff << 16 | (rmvEntrySize & 0xFFFF);
+                            PageUtils.putInt(pageAddr, rmvdItemOff, item);
+
+                            break;
+                        }
+
+                        rmvdItemOff += REMOVED_ITEM_SIZE;
+                    }
                 }
             }
 
@@ -1285,7 +1301,7 @@ public class DataPageIO extends PageIO {
         int newEntrySize,
         CacheDataRow row,
         int firstEntryOff) throws IgniteCheckedException {
-        cnt.increment();
+        //cnt.increment();
 
         assert checkCount(directCnt): directCnt;
 
@@ -1336,7 +1352,7 @@ public class DataPageIO extends PageIO {
                 }
 
                 if (foundDataOff != 0) {
-                    foundCnt1.increment();
+                    //foundCnt1.increment();
 
                     try {
                         assert foundDataOff > ITEMS_OFF && foundDataOff < pageSize
/*&& newEntryOff != getFirstEntryOffset(pageAddr)*/ :
@@ -1468,7 +1484,7 @@ public class DataPageIO extends PageIO {
                 assert delta > 0 : delta;
 
                 if (row != null && delta >= newEntrySize) {
-                    foundCnt2.increment();
+                    //foundCnt2.increment();
 
                     int newEntryOff = curOff + curEntrySize;
 


Mime
View raw message