ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [48/50] [abbrv] ignite git commit: Lock tracing
Date Thu, 04 Oct 2018 16:03:56 GMT
Lock tracing


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

Branch: refs/heads/ignite-5797
Commit: aa8688084226ad4f1ee27319c3a1bde4f34f9bc9
Parents: 987ba6b
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Thu Oct 4 17:09:09 2018 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Thu Oct 4 17:09:09 2018 +0300

----------------------------------------------------------------------
 .../distributed/GridDistributedLockRequest.java | 25 ++++++++++++++--
 .../GridDistributedLockResponse.java            | 31 +++++++++++++++++---
 .../distributed/dht/GridDhtLockFuture.java      |  6 +++-
 .../distributed/dht/GridDhtLockRequest.java     | 11 +++++--
 .../distributed/dht/GridDhtLockResponse.java    | 27 +++++++++++++----
 .../dht/GridDhtTransactionalCacheAdapter.java   | 25 ++++++++++------
 .../cache/distributed/dht/GridDhtTxLocal.java   |  2 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |  2 --
 .../colocated/GridDhtColocatedLockFuture.java   |  6 +++-
 .../distributed/near/GridNearLockFuture.java    |  6 +++-
 .../distributed/near/GridNearLockRequest.java   | 10 +++++--
 .../distributed/near/GridNearLockResponse.java  |  8 +++--
 .../processors/trace/IgniteTraceAware.java      | 11 ++++++-
 13 files changed, 135 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
index 25a557c..8858e97 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
@@ -29,6 +29,8 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
+import org.apache.ignite.internal.processors.trace.IgniteTraceAware;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.lang.IgniteUuid;
@@ -41,7 +43,7 @@ import org.jetbrains.annotations.Nullable;
 /**
  * Lock request message.
  */
-public class GridDistributedLockRequest extends GridDistributedBaseMessage {
+public class GridDistributedLockRequest extends GridDistributedBaseMessage implements IgniteTraceAware
{
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -99,6 +101,9 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage
{
     /** Additional flags. */
     private byte flags;
 
+    /** */
+    private EventsTrace evtsTrace;
+
     /**
      * Empty constructor.
      */
@@ -139,7 +144,8 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage
{
         int txSize,
         boolean skipStore,
         boolean keepBinary,
-        boolean addDepInfo
+        boolean addDepInfo,
+        EventsTrace evtsTrace
     ) {
         super(lockVer, keyCnt, addDepInfo);
 
@@ -163,6 +169,21 @@ public class GridDistributedLockRequest extends GridDistributedBaseMessage
{
 
         skipStore(skipStore);
         keepBinary(keepBinary);
+
+        this.evtsTrace = evtsTrace;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void recordTracePoint(TracePoint pt) {
+        if (evtsTrace != null)
+            evtsTrace.recordTracePoint(pt);
+    }
+
+    /**
+     * @return Node trace.
+     */
+    public EventsTrace nodeTrace() {
+        return evtsTrace;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
index 4b21896..55470fd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockResponse.java
@@ -28,6 +28,8 @@ import org.apache.ignite.internal.GridDirectTransient;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
+import org.apache.ignite.internal.processors.trace.IgniteTraceAware;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.S;
@@ -41,7 +43,7 @@ import org.jetbrains.annotations.Nullable;
 /**
  * Lock response message.
  */
-public class GridDistributedLockResponse extends GridDistributedBaseMessage {
+public class GridDistributedLockResponse extends GridDistributedBaseMessage implements IgniteTraceAware
{
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -60,6 +62,9 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage
{
     @GridDirectCollection(CacheObject.class)
     private List<CacheObject> vals;
 
+    /** */
+    private EventsTrace evtsTrace;
+
     /**
      * Empty constructor (required by {@link Externalizable}).
      */
@@ -67,6 +72,16 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage
{
         /* No-op. */
     }
 
+    /** {@inheritDoc} */
+    @Override public void recordTracePoint(TracePoint pt) {
+        if (evtsTrace != null)
+            evtsTrace.recordTracePoint(pt);
+    }
+
+    public EventsTrace nodeTrace() {
+        return evtsTrace;
+    }
+
     /**
      * @param cacheId Cache ID.
      * @param lockVer Lock version.
@@ -78,7 +93,9 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage
{
         GridCacheVersion lockVer,
         IgniteUuid futId,
         int cnt,
-        boolean addDepInfo) {
+        boolean addDepInfo,
+        EventsTrace evtsTrace
+    ) {
         super(lockVer, cnt, addDepInfo);
 
         assert futId != null;
@@ -87,6 +104,8 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage
{
         this.futId = futId;
 
         vals = new ArrayList<>(cnt);
+
+        this.evtsTrace = evtsTrace;
     }
 
     /**
@@ -100,7 +119,9 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage
{
         GridCacheVersion lockVer,
         IgniteUuid futId,
         Throwable err,
-        boolean addDepInfo) {
+        boolean addDepInfo,
+        EventsTrace evtsTrace
+    ) {
         super(lockVer, 0, addDepInfo);
 
         assert futId != null;
@@ -123,7 +144,9 @@ public class GridDistributedLockResponse extends GridDistributedBaseMessage
{
         IgniteUuid futId,
         int cnt,
         Throwable err,
-        boolean addDepInfo) {
+        boolean addDepInfo,
+        EventsTrace evtsTrace
+    ) {
         super(lockVer, cnt, addDepInfo);
 
         assert futId != null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
index ef369cf..6cb86c9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -63,6 +63,7 @@ import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.dr.GridDrType;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
@@ -555,6 +556,8 @@ public final class GridDhtLockFuture extends GridCacheCompoundIdentityFuture<Boo
             if (mini != null) {
                 assert mini.node().id().equals(nodeId);
 
+                tx.collectNodeTrace(nodeId, res.nodeTrace());
+
                 mini.onResult(res);
 
                 return;
@@ -946,7 +949,8 @@ public final class GridDhtLockFuture extends GridCacheCompoundIdentityFuture<Boo
                             skipStore,
                             cctx.store().configured(),
                             keepBinary,
-                            cctx.deploymentEnabled());
+                            cctx.deploymentEnabled(),
+                            tx.nodeTrace() != null ? new EventsTrace() : null);
 
                         try {
                             for (ListIterator<GridDhtCacheEntry> it = dhtMapping.listIterator();
it.hasNext(); ) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
index 1ac5818..0ec7096 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockRequest.java
@@ -34,6 +34,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockRequest;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
 import org.apache.ignite.internal.util.GridLeanMap;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
@@ -147,7 +148,8 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
         boolean skipStore,
         boolean storeUsed,
         boolean keepBinary,
-        boolean addDepInfo
+        boolean addDepInfo,
+        EventsTrace evtsTrace
     ) {
         super(cacheId,
             nodeId,
@@ -164,13 +166,14 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
             txSize,
             skipStore,
             keepBinary,
-            addDepInfo);
+            addDepInfo,
+            evtsTrace);
 
         this.topVer = topVer;
 
         storeUsed(storeUsed);
 
-        nearKeys = nearCnt == 0 ? Collections.<KeyCacheObject>emptyList() : new ArrayList<KeyCacheObject>(nearCnt);
+        nearKeys = nearCnt == 0 ? Collections.emptyList() : new ArrayList<>(nearCnt);
         invalidateEntries = new BitSet(dhtCnt == 0 ? nearCnt : dhtCnt);
 
         assert miniId != null;
@@ -179,6 +182,8 @@ public class GridDhtLockRequest extends GridDistributedLockRequest {
         this.subjId = subjId;
         this.taskNameHash = taskNameHash;
         this.accessTtl = accessTtl;
+
+        recordTracePoint(TracePoint.DHT_LOCK_REQUEST_CREATED);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
index 87abd6c..9f9ff6d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
@@ -32,6 +32,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockResponse;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.lang.IgniteUuid;
@@ -77,9 +78,16 @@ public class GridDhtLockResponse extends GridDistributedLockResponse {
      * @param cnt Key count.
      * @param addDepInfo Deployment info.
      */
-    public GridDhtLockResponse(int cacheId, GridCacheVersion lockVer, IgniteUuid futId, IgniteUuid
miniId, int cnt,
-        boolean addDepInfo) {
-        super(cacheId, lockVer, futId, cnt, addDepInfo);
+    public GridDhtLockResponse(
+        int cacheId,
+        GridCacheVersion lockVer,
+        IgniteUuid futId,
+        IgniteUuid miniId,
+        int cnt,
+        boolean addDepInfo,
+        EventsTrace evtsTrace
+    ) {
+        super(cacheId, lockVer, futId, cnt, addDepInfo, evtsTrace);
 
         assert miniId != null;
 
@@ -93,9 +101,16 @@ public class GridDhtLockResponse extends GridDistributedLockResponse {
      * @param err Error.
      * @param addDepInfo
      */
-    public GridDhtLockResponse(int cacheId, GridCacheVersion lockVer, IgniteUuid futId, IgniteUuid
miniId,
-        Throwable err, boolean addDepInfo) {
-        super(cacheId, lockVer, futId, err, addDepInfo);
+    public GridDhtLockResponse(
+        int cacheId,
+        GridCacheVersion lockVer,
+        IgniteUuid futId,
+        IgniteUuid miniId,
+        Throwable err,
+        boolean addDepInfo,
+        EventsTrace evtsTrace
+    ) {
+        super(cacheId, lockVer, futId, err, addDepInfo, evtsTrace);
 
         assert miniId != null;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index 52638c0..2bc0f2d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -528,7 +528,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends
GridDhtCach
             req.futureId(),
             req.miniId(),
             e,
-            ctx.deploymentEnabled());
+            ctx.deploymentEnabled(),
+            req.nodeTrace());
 
         try {
             ctx.io().send(nodeId, res, ctx.ioPolicy());
@@ -563,7 +564,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends
GridDhtCach
 
         try {
             res = new GridDhtLockResponse(ctx.cacheId(), req.version(), req.futureId(), req.miniId(),
cnt,
-                ctx.deploymentEnabled());
+                ctx.deploymentEnabled(), req.nodeTrace());
 
             dhtTx = startRemoteTx(nodeId, req, res);
             nearTx = isNearEnabled(cacheCfg) ? near().startRemoteTx(nodeId, req) : null;
@@ -590,7 +591,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends
GridDhtCach
             U.error(log, err, e);
 
             res = new GridDhtLockResponse(ctx.cacheId(), req.version(), req.futureId(), req.miniId(),
-                new IgniteTxRollbackCheckedException(err, e), ctx.deploymentEnabled());
+                new IgniteTxRollbackCheckedException(err, e), ctx.deploymentEnabled(), req.nodeTrace());
 
             fail = true;
         }
@@ -603,7 +604,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends
GridDhtCach
                 req.version(),
                 req.futureId(),
                 req.miniId(),
-                new IgniteCheckedException(err, e), ctx.deploymentEnabled());
+                new IgniteCheckedException(err, e), ctx.deploymentEnabled(),
+                req.nodeTrace());
 
             fail = true;
         }
@@ -1334,9 +1336,11 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V>
extends GridDhtCach
      * @param topVer Remap version.
      * @return Response.
      */
-    private GridNearLockResponse sendClientLockRemapResponse(ClusterNode nearNode,
+    private GridNearLockResponse sendClientLockRemapResponse(
+        ClusterNode nearNode,
         GridNearLockRequest req,
-        AffinityTopologyVersion topVer) {
+        AffinityTopologyVersion topVer
+    ) {
         assert topVer != null;
 
         GridNearLockResponse res = new GridNearLockResponse(
@@ -1348,7 +1352,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends
GridDhtCach
             0,
             null,
             topVer,
-            ctx.deploymentEnabled());
+            ctx.deploymentEnabled(),
+            req.nodeTrace());
 
         try {
             ctx.io().send(nearNode, res, ctx.ioPolicy());
@@ -1394,7 +1399,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends
GridDhtCach
                 entries.size(),
                 err,
                 null,
-                ctx.deploymentEnabled());
+                ctx.deploymentEnabled(),
+                tx.nodeTrace());
 
             if (err == null) {
                 res.pending(localDhtPendingVersions(entries, mappedVer));
@@ -1504,7 +1510,8 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends
GridDhtCach
                 entries.size(),
                 e,
                 null,
-                ctx.deploymentEnabled());
+                ctx.deploymentEnabled(),
+                tx.nodeTrace());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
index 751ec3f..f3f3112 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
@@ -355,7 +355,7 @@ public class GridDhtTxLocal extends GridDhtTxLocalAdapter implements GridCacheMa
             return chainOnePhasePrepare(fut);
         }
 
-        this.eventsTrace = eventsTrace;
+        eventsTrace = req.nodeTrace();
 
         if (state() != PREPARING) {
             if (!state(PREPARING)) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
index 887c76b..523e6a2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
@@ -41,7 +41,6 @@ import org.apache.ignite.internal.IgniteDiagnosticPrepareContext;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
 import org.apache.ignite.internal.processors.cache.CacheInvokeEntry;
 import org.apache.ignite.internal.processors.cache.CacheLockCandidates;
 import org.apache.ignite.internal.processors.cache.CacheObject;
@@ -69,7 +68,6 @@ import org.apache.ignite.internal.processors.cache.mvcc.txlog.TxState;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
-import org.apache.ignite.internal.processors.cache.transactions.TxCounters;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.dr.GridDrType;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
index 9dbb8be..fc504a1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedLockFuture.java
@@ -61,6 +61,7 @@ import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
 import org.apache.ignite.internal.processors.cache.transactions.TxDeadlock;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
 import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
 import org.apache.ignite.internal.util.future.GridEmbeddedFuture;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -486,6 +487,8 @@ public final class GridDhtColocatedLockFuture extends GridCacheCompoundIdentityF
         if (mini != null) {
             assert mini.node().id().equals(nodeId);
 
+            tx.collectNodeTrace(nodeId, res.nodeTrace());
+
             mini.onResult(res);
 
             return true;
@@ -1073,7 +1076,8 @@ public final class GridDhtColocatedLockFuture extends GridCacheCompoundIdentityF
                                         keepBinary,
                                         clientFirst,
                                         false,
-                                        cctx.deploymentEnabled());
+                                        cctx.deploymentEnabled(),
+                                        cctx.kernalContext().trace().tracingEnabled() ? new
EventsTrace() : null);
 
                                     mapping.request(req);
                                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
index 6cd4514..9b26e77 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
@@ -57,6 +57,7 @@ import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
 import org.apache.ignite.internal.processors.cache.transactions.TxDeadlock;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
 import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
 import org.apache.ignite.internal.util.future.GridEmbeddedFuture;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -525,6 +526,8 @@ public final class GridNearLockFuture extends GridCacheCompoundIdentityFuture<Bo
             if (log.isDebugEnabled())
                 log.debug("Found mini future for response [mini=" + mini + ", res=" + res
+ ']');
 
+            tx.collectNodeTrace(nodeId, res.nodeTrace());
+
             mini.onResult(res);
 
             if (log.isDebugEnabled())
@@ -1123,7 +1126,8 @@ public final class GridNearLockFuture extends GridCacheCompoundIdentityFuture<Bo
                                                 keepBinary,
                                                 clientFirst,
                                                 true,
-                                                cctx.deploymentEnabled());
+                                                cctx.deploymentEnabled(),
+                                                cctx.kernalContext().trace().tracingEnabled()
? new EventsTrace() : null);
 
                                             mapping.request(req);
                                         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
index f736cae..009d928 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockRequest.java
@@ -29,6 +29,8 @@ import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockRequest;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
+import org.apache.ignite.internal.processors.trace.IgniteTraceAware.TracePoint;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.lang.IgniteUuid;
@@ -141,7 +143,8 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
         boolean keepBinary,
         boolean firstClientReq,
         boolean nearCache,
-        boolean addDepInfo
+        boolean addDepInfo,
+        EventsTrace evtsTrace
     ) {
         super(
             cacheId,
@@ -159,7 +162,8 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
             txSize,
             skipStore,
             keepBinary,
-            addDepInfo);
+            addDepInfo,
+            evtsTrace);
 
         assert topVer.compareTo(AffinityTopologyVersion.ZERO) > 0;
 
@@ -175,6 +179,8 @@ public class GridNearLockRequest extends GridDistributedLockRequest {
         setFlag(firstClientReq, FIRST_CLIENT_REQ_FLAG_MASK);
         setFlag(retVal, NEED_RETURN_VALUE_FLAG_MASK);
         setFlag(nearCache, NEAR_CACHE_FLAG_MASK);
+
+        recordTracePoint(TracePoint.NEAR_LOCK_REQUEST_CREATED);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
index e88f0a0..2bbe861 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockResponse.java
@@ -26,6 +26,7 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockResponse;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
+import org.apache.ignite.internal.processors.trace.EventsTrace;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.lang.IgniteUuid;
@@ -90,9 +91,10 @@ public class GridNearLockResponse extends GridDistributedLockResponse {
         int cnt,
         Throwable err,
         AffinityTopologyVersion clientRemapVer,
-        boolean addDepInfo
+        boolean addDepInfo,
+        EventsTrace evtsTrace
     ) {
-        super(cacheId, lockVer, futId, cnt, err, addDepInfo);
+        super(cacheId, lockVer, futId, cnt, err, addDepInfo, evtsTrace);
 
         assert miniId != 0;
 
@@ -104,6 +106,8 @@ public class GridNearLockResponse extends GridDistributedLockResponse
{
 
         if (filterRes)
             this.filterRes = new boolean[cnt];
+
+        recordTracePoint(TracePoint.NEAR_LOCK_RESPONSE_CREATED);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/aa868808/modules/core/src/main/java/org/apache/ignite/internal/processors/trace/IgniteTraceAware.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/trace/IgniteTraceAware.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/trace/IgniteTraceAware.java
index 4356a3c..b61b8c9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/trace/IgniteTraceAware.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/trace/IgniteTraceAware.java
@@ -32,14 +32,23 @@ public interface IgniteTraceAware {
         MSG_NIO_RECEIVE,
         MSG_NIO_SEND,
         MSG_LISTENER_INVOKE,
+        NEAR_LOCK_REQUEST_CREATED,
+        NEAR_LOCK_RESPONSE_CREATED,
         NEAR_PREPARE_REQUEST_CREATED,
         NEAR_PREPARE_RESPONSE_CREATED,
+        DHT_LOCK_REQUEST_CREATED,
+        DHT_LOCK_RESPONSE_CREATED,
         DHT_PREPARE_REQUEST_CREATED,
         DHT_PREPARE_RESPONSE_CREATED,
         NEAR_FINISH_REQUEST_CREATED,
         NEAR_FINISH_RESPONSE_CREATED,
         DHT_FINISH_REQUEST_CREATED,
-        DHT_FINISH_RESPONSE_CREATED;
+        DHT_FINISH_RESPONSE_CREATED,
+        TX_LOCAL_WRITE_BEGIN,
+        TX_LOCAL_WRITE_END,
+        TX_LOCAL_WAL_SYNC_BEGIN,
+        TX_LOCAL_WAL_SYNC_END,
+        ;
 
         /** */
         private static final TracePoint[] VALS = values();


Mime
View raw message