ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [4/9] ignite git commit: debug
Date Wed, 18 Jan 2017 15:27:40 GMT
debug


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

Branch: refs/heads/ignite-db-x-opt
Commit: 177f39946bb62a1df28381a96d013086b1250d9b
Parents: 921b5c7
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Dec 15 12:49:32 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Dec 15 12:49:32 2016 +0300

----------------------------------------------------------------------
 .../cache/database/tree/io/DataPageIO.java      | 86 +++++++++++---------
 1 file changed, 47 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/177f3994/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 badf6f5..a282d98 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
@@ -1156,45 +1156,53 @@ public class DataPageIO extends PageIO {
             if (delta != 0) { // Move right.
                 assert delta > 0: delta;
 
-                int cnt = 1;
-                int mvSize = entrySize;
-
-                for (int j = i - 1; j >= 0; j++) {
-                    int off0 = offs[j] >>> 8;
-                    int entrySize0 = getPageEntrySize(buf, off0, SHOW_PAYLOAD_LEN | SHOW_LINK);
-                    int o = off0 + entrySize0;
-
-                    if (o != off)
-                        break;
-
-                    mvSize += entrySize0;
-                    off = off0;
-
-                    cnt++;
-                }
-
-                if (cnt > 1) {
-                    moveBytes(buf, off, mvSize, delta);
-
-                    for (int j = 0; j < cnt; j++) {
-                        int itemId = offs[i + j] & 0xFF;
-
-                        off += delta;
-
-                        setItem(buf, itemId, directItemFromOffset(off));
-                    }
-
-                    i += cnt;
-                }
-                else {
-                    moveBytes(buf, off, entrySize, delta);
-
-                    int itemId = offs[i] & 0xFF;
-
-                    off += delta;
-
-                    setItem(buf, itemId, directItemFromOffset(off));
-                }
+                moveBytes(buf, off, entrySize, delta);
+
+                int itemId = offs[i] & 0xFF;
+
+                off += delta;
+
+                setItem(buf, itemId, directItemFromOffset(off));
+
+//                int cnt = 1;
+//                int mvSize = entrySize;
+//
+//                for (int j = i - 1; j >= 0; j++) {
+//                    int off0 = offs[j] >>> 8;
+//                    int entrySize0 = getPageEntrySize(buf, off0, SHOW_PAYLOAD_LEN | SHOW_LINK);
+//                    int o = off0 + entrySize0;
+//
+//                    if (o != off)
+//                        break;
+//
+//                    mvSize += entrySize0;
+//                    off = off0;
+//
+//                    cnt++;
+//                }
+//
+//                if (cnt > 1) {
+//                    moveBytes(buf, off, mvSize, delta);
+//
+//                    for (int j = 0; j < cnt; j++) {
+//                        int itemId = offs[i + j] & 0xFF;
+//
+//                        off += delta;
+//
+//                        setItem(buf, itemId, directItemFromOffset(off));
+//                    }
+//
+//                    i += cnt;
+//                }
+//                else {
+//                    moveBytes(buf, off, entrySize, delta);
+//
+//                    int itemId = offs[i] & 0xFF;
+//
+//                    off += delta;
+//
+//                    setItem(buf, itemId, directItemFromOffset(off));
+//                }
             }
 
             prevOff = off;


Mime
View raw message