ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [4/8] ignite git commit: debugging slowdowns
Date Thu, 26 Nov 2015 16:49:06 GMT
debugging slowdowns


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

Branch: refs/heads/ignite-1.5
Commit: 45c235e87959724ba2101c3b4d969a0b67595b7f
Parents: 0be5dea
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Thu Nov 26 00:35:35 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Thu Nov 26 00:35:35 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheIoManager.java  |  4 +++-
 .../cache/distributed/dht/GridDhtCacheAdapter.java     |  3 ++-
 .../dht/GridPartitionedSingleGetFuture.java            |  2 +-
 .../distributed/near/GridNearSingleGetRequest.java     | 12 +++++-------
 .../distributed/near/GridNearSingleGetResponse.java    | 13 +++++--------
 5 files changed, 16 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/45c235e8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
index 9afbca8..54f8ca0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
@@ -67,6 +67,7 @@ import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiInClosure;
 import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.lang.IgniteUuid;
 import org.jetbrains.annotations.Nullable;
 import org.jsr166.ConcurrentHashMap8;
 
@@ -541,7 +542,8 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter
{
             case 117: {
                 GridNearSingleGetResponse res = (GridNearSingleGetResponse)msg;
 
-                GridPartitionedSingleGetFuture fut = (GridPartitionedSingleGetFuture)ctx.mvcc().future(res.futureId());
+                GridPartitionedSingleGetFuture fut = (GridPartitionedSingleGetFuture)ctx.mvcc()
+                    .future(new IgniteUuid(IgniteUuid.VM_ID, res.futureId()));
 
                 if (fut == null) {
                     if (log.isDebugEnabled())

http://git-wip-us.apache.org/repos/asf/ignite/blob/45c235e8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index 50fabe9..7648f10 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -140,7 +140,8 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
         if (log.isDebugEnabled())
             log.debug("Processing near get response [nodeId=" + nodeId + ", res=" + res +
']');
 
-        GridPartitionedSingleGetFuture fut = (GridPartitionedSingleGetFuture)ctx.mvcc().future(res.futureId());
+        GridPartitionedSingleGetFuture fut = (GridPartitionedSingleGetFuture)ctx.mvcc()
+            .future(new IgniteUuid(IgniteUuid.VM_ID, res.futureId()));
 
         if (fut == null) {
             if (log.isDebugEnabled())

http://git-wip-us.apache.org/repos/asf/ignite/blob/45c235e8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
index 5923517..84fe150 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
@@ -262,7 +262,7 @@ public class GridPartitionedSingleGetFuture extends GridFutureAdapter<Object>
im
 
             if (node.version().compareTo(SINGLE_GET_MSG_SINCE) >= 0) {
                 req = new GridNearSingleGetRequest(cctx.cacheId(),
-                    futId,
+                    futId.localId(),
                     key,
                     readThrough,
                     topVer,

http://git-wip-us.apache.org/repos/asf/ignite/blob/45c235e8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
index a506007..aa96720 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
@@ -27,7 +27,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheMessage;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.plugin.extensions.communication.Message;
 import org.apache.ignite.plugin.extensions.communication.MessageReader;
 import org.apache.ignite.plugin.extensions.communication.MessageWriter;
@@ -58,7 +57,7 @@ public class GridNearSingleGetRequest extends GridCacheMessage implements
GridCa
     public static final int NEED_ENTRY_INFO_FLAG_MASK = 0x10;
 
     /** Future ID. */
-    private IgniteUuid futId;
+    private long futId;
 
     /** */
     private KeyCacheObject key;
@@ -102,7 +101,7 @@ public class GridNearSingleGetRequest extends GridCacheMessage implements
GridCa
      */
     public GridNearSingleGetRequest(
         int cacheId,
-        IgniteUuid futId,
+        long futId,
         KeyCacheObject key,
         boolean readThrough,
         @NotNull AffinityTopologyVersion topVer,
@@ -114,7 +113,6 @@ public class GridNearSingleGetRequest extends GridCacheMessage implements
GridCa
         boolean needVer,
         boolean addDepInfo
     ) {
-        assert futId != null;
         assert key != null;
 
         this.cacheId = cacheId;
@@ -149,7 +147,7 @@ public class GridNearSingleGetRequest extends GridCacheMessage implements
GridCa
     /**
      * @return Future ID.
      */
-    public IgniteUuid futureId() {
+    public long futureId() {
         return futId;
     }
 
@@ -268,7 +266,7 @@ public class GridNearSingleGetRequest extends GridCacheMessage implements
GridCa
                 reader.incrementState();
 
             case 5:
-                futId = reader.readIgniteUuid("futId");
+                futId = reader.readLong("futId");
 
                 if (!reader.isLastRead())
                     return false;
@@ -340,7 +338,7 @@ public class GridNearSingleGetRequest extends GridCacheMessage implements
GridCa
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeLong("futId", futId))
                     return false;
 
                 writer.incrementState();

http://git-wip-us.apache.org/repos/asf/ignite/blob/45c235e8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetResponse.java
index ba0081c..42ad7ed 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetResponse.java
@@ -28,7 +28,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheEntryInfo;
 import org.apache.ignite.internal.processors.cache.GridCacheMessage;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.plugin.extensions.communication.Message;
 import org.apache.ignite.plugin.extensions.communication.MessageReader;
 import org.apache.ignite.plugin.extensions.communication.MessageWriter;
@@ -48,7 +47,7 @@ public class GridNearSingleGetResponse extends GridCacheMessage implements
GridC
     public static final int CONTAINS_VAL_FLAG_MASK = 0x2;
 
     /** Future ID. */
-    private IgniteUuid futId;
+    private long futId;
 
     /** */
     private Message res;
@@ -83,14 +82,12 @@ public class GridNearSingleGetResponse extends GridCacheMessage implements
GridC
      */
     public GridNearSingleGetResponse(
         int cacheId,
-        IgniteUuid futId,
+        long futId,
         AffinityTopologyVersion topVer,
         @Nullable Message res,
         boolean invalidPartitions,
         boolean addDepInfo
     ) {
-        assert futId != null;
-
         this.cacheId = cacheId;
         this.futId = futId;
         this.topVer = topVer;
@@ -151,7 +148,7 @@ public class GridNearSingleGetResponse extends GridCacheMessage implements
GridC
     /**
      * @return Future ID.
      */
-    public IgniteUuid futureId() {
+    public long futureId() {
         return futId;
     }
 
@@ -221,7 +218,7 @@ public class GridNearSingleGetResponse extends GridCacheMessage implements
GridC
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeIgniteUuid("futId", futId))
+                if (!writer.writeLong("futId", futId))
                     return false;
 
                 writer.incrementState();
@@ -271,7 +268,7 @@ public class GridNearSingleGetResponse extends GridCacheMessage implements
GridC
                 reader.incrementState();
 
             case 5:
-                futId = reader.readIgniteUuid("futId");
+                futId = reader.readLong("futId");
 
                 if (!reader.isLastRead())
                     return false;


Mime
View raw message