ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [10/17] ignite git commit: Added trace logging for entry/offheap updates.
Date Thu, 26 May 2016 06:30:40 GMT
Added trace logging for entry/offheap updates.


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

Branch: refs/heads/ignite-3116
Commit: 78be02fea89b82c6e16ec9af15af0a8416956b4d
Parents: 327f0dd
Author: sboikov <sboikov@gridgain.com>
Authored: Wed May 25 10:06:43 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed May 25 10:06:43 2016 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheMapEntry.java     | 204 ++++++++++++++++---
 .../processors/cache/GridCacheSwapManager.java  |   6 +
 .../distributed/dht/GridDhtCacheEntry.java      |   8 +
 .../dht/GridDhtOffHeapCacheEntry.java           |   8 +
 .../atomic/GridDhtAtomicOffHeapCacheEntry.java  |   8 +
 .../GridDhtColocatedOffHeapCacheEntry.java      |   8 +
 .../offheap/GridOffHeapProcessor.java           |  12 ++
 7 files changed, 224 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/78be02fe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index b369df1..f442202 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -454,6 +454,13 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
             if (cctx.swap().onOffheapEvict(key, entry, partition(), evictVer)) {
                 assert !hasValueUnlocked() : this;
 
+                if (log.isTraceEnabled()) {
+                    log.trace("onOffheapEvict evicted [key=" + key +
+                        ", entry=" + System.identityHashCode(this) +
+                        ", ptr=" + offHeapPointer() +
+                        ']');
+                }
+
                 obsolete = markObsolete0(obsoleteVer, false, null);
 
                 assert obsolete : this;
@@ -464,8 +471,16 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
                     clearIndex(val);
                 }
             }
-            else
+            else {
                 obsolete = false;
+
+                if (log.isTraceEnabled()) {
+                    log.trace("onOffheapEvict not evicted [key=" + key +
+                        ", entry=" + System.identityHashCode(this) +
+                        ", ptr=" + offHeapPointer() +
+                        ']');
+                }
+            }
         }
 
         if (obsolete)
@@ -514,6 +529,21 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
                 if (cctx.offheapTiered()) {
                     e = cctx.swap().readOffheapPointer(this);
 
+                    if (log.isTraceEnabled()) {
+                        if (e != null) {
+                            log.trace("Read offheap pointer [key=" + key +
+                                ", entry=" + System.identityHashCode(this) +
+                                ", ptr=" + e.offheapPointer() +
+                                ']');
+                        }
+                        else {
+                            log.trace("Read offheap pointer [key=" + key +
+                                ", entry=" + System.identityHashCode(this) +
+                                ", val=" + null +
+                                ']');
+                        }
+                    }
+
                     if (e != null) {
                         if (e.offheapPointer() > 0) {
                             offHeapPointer(e.offheapPointer());
@@ -530,11 +560,16 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
                             offHeapPointer(0);
                     }
                 }
-                else
+                else {
                     e = cctx.swap().readAndRemove(this);
 
-                if (log.isDebugEnabled())
-                    log.debug("Read swap entry [swapEntry=" + e + ", cacheEntry=" + this
+ ']');
+                    if (log.isTraceEnabled()) {
+                        log.trace("unswap readAndRemove [key=" + key +
+                            ", entry=" + System.identityHashCode(this) +
+                            ", found=" + (e != null) +
+                            ']');
+                    }
+                }
 
                 flags |= IS_UNSWAPPED_MASK;
 
@@ -598,11 +633,20 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
             boolean offheapPtr = hasOffHeapPointer();
 
             if (cctx.offheapTiered() && offheapPtr && !swapNeeded) {
-                if (log.isDebugEnabled())
-                    log.debug("Value did not change, skip write swap entry: " + this);
+                if (cctx.swap().offheapEvictionEnabled()) {
+                    if (log.isTraceEnabled()) {
+                        log.trace("enableOffheapEviction [key=" + key +
+                            ", entry=" + System.identityHashCode(this) +
+                            ", ptr=" + offHeapPointer() +
+                            ']');
+                    }
 
-                if (cctx.swap().offheapEvictionEnabled())
                     cctx.swap().enableOffheapEviction(key(), partition());
+                }
+                else {
+                    if (log.isTraceEnabled())
+                        log.trace("Value did not change, skip write swap entry: " + this);
+                }
 
                 return;
             }
@@ -622,6 +666,13 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
 
             IgniteBiTuple<byte[], Byte> valBytes = valueBytes0();
 
+            if (log.isTraceEnabled()) {
+                log.trace("writeToOffheap [key=" + key +
+                    ", entry=" + System.identityHashCode(this) +
+                    ", ptr=" + offHeapPointer() +
+                    ']');
+            }
+
             cctx.swap().write(key(),
                 ByteBuffer.wrap(valBytes.get1()),
                 valBytes.get2(),
@@ -633,9 +684,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
                 !offheapPtr);
 
             flags &= ~IS_SWAPPING_REQUIRED;
-
-            if (log.isDebugEnabled())
-                log.debug("Wrote swap entry: " + this);
         }
     }
 
@@ -671,10 +719,14 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
         if (cctx.isSwapOrOffheapEnabled()) {
             assert Thread.holdsLock(this);
 
-            cctx.swap().remove(key(), partition());
+            if (log.isTraceEnabled()) {
+                log.trace("removeFromSwap [key=" + key +
+                    ", entry=" + System.identityHashCode(this) +
+                    ", ptr=" + offHeapPointer() +
+                    ']');
+            }
 
-            if (log.isDebugEnabled())
-                log.debug("Removed swap entry [entry=" + this + ']');
+            cctx.swap().remove(key(), partition());
         }
     }
 
@@ -943,8 +995,15 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
 
                     update(ret, expTime, ttl, nextVer, true);
 
-                    if (hadValPtr && cctx.offheapTiered())
+                    if (hadValPtr && cctx.offheapTiered()) {
+                        if (log.isTraceEnabled()) {
+                            log.trace("innerGet removeOffheap [key=" + key +
+                                ", entry=" + System.identityHashCode(this) +
+                                ", ptr=" + offHeapPointer() + ']');
+                        }
+
                         cctx.swap().removeOffheap(key);
+                    }
 
                     if (cctx.deferredDelete() && deletedUnlocked() && !isInternal()
&& !detached())
                         deletedUnlocked(false);
@@ -1014,10 +1073,17 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
 
                 // If version matched, set value.
                 if (startVer.equals(ver)) {
-                    releaseSwap();
-
                     CacheObject old = rawGetOrUnmarshalUnlocked(false);
 
+                    if (log.isTraceEnabled()) {
+                        log.trace("innerReload releaseSwap [key=" + key +
+                            ", entry=" + System.identityHashCode(this) +
+                            ", old=" + old +
+                            ", ptr=" + offHeapPointer() + ']');
+                    }
+
+                    releaseSwap();
+
                     long expTime = CU.toExpireTime(ttl);
 
                     // Detach value before index update.
@@ -1319,6 +1385,13 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
             boolean startVer = isStartVersion();
 
             if (startVer) {
+                if (log.isTraceEnabled()) {
+                    log.trace("innerRemove releaseSwap [key=" + key +
+                        ", entry=" + System.identityHashCode(this) +
+                        ", ptr=" + offHeapPointer() +
+                        ']');
+                }
+
                 // Release swap.
                 releaseSwap();
             }
@@ -1434,6 +1507,14 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
             if (cctx.offheapTiered() && hadValPtr) {
                 boolean rmv = cctx.swap().removeOffheap(key);
 
+                if (log.isTraceEnabled()) {
+                    log.trace("innerRemove remove offheap [key=" + key +
+                        ", entry=" + System.identityHashCode(this) +
+                        ", rmv=" + rmv +
+                        ", ptr=" + offHeapPointer() +
+                        ']');
+                }
+
                 assert rmv;
             }
 
@@ -1810,12 +1891,18 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
                     cctx.config().getInterceptor().onAfterRemove(new CacheLazyEntry(cctx,
key, key0, old, old0, keepBinary));
             }
 
-            if (op != GridCacheOperation.UPDATE) {
-                if (cctx.offheapTiered() && hasValPtr) {
-                    boolean rmv = cctx.swap().removeOffheap(key);
+            if (op != GridCacheOperation.UPDATE && cctx.offheapTiered() &&
hasValPtr) {
+                boolean rmv = cctx.swap().removeOffheap(key);
 
-                    assert rmv;
+                if (log.isTraceEnabled()) {
+                    log.trace("innerUpdateLocal remove offheap [key=" + key +
+                        ", entry=" + System.identityHashCode(this) +
+                        ", rmv=" + rmv +
+                        ", ptr=" + offHeapPointer() +
+                        ']');
                 }
+
+                assert rmv;
             }
         }
 
@@ -2309,6 +2396,13 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
 
             // Actual update.
             if (op == GridCacheOperation.UPDATE) {
+                if (log.isTraceEnabled()) {
+                    log.trace("innerUpdate [key=" + key +
+                        ", entry=" + System.identityHashCode(this) +
+                        ", ptr=" + offHeapPointer() +
+                        ']');
+                }
+
                 if (intercept) {
                     updated0 = value(updated0, updated, keepBinary, false);
 
@@ -2510,12 +2604,18 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
                     oldVal = cctx.toCacheObject(cctx.unwrapTemporary(interceptRes.get2()));
             }
 
-            if (op != GridCacheOperation.UPDATE) {
-                if (cctx.offheapTiered() && hasValPtr) {
-                    boolean rmv = cctx.swap().removeOffheap(key);
+            if (op != GridCacheOperation.UPDATE && cctx.offheapTiered() &&
hasValPtr) {
+                boolean rmv = cctx.swap().removeOffheap(key);
 
-                    assert rmv;
+                if (log.isTraceEnabled()) {
+                    log.trace("innerUpdate remove offheap [key=" + key +
+                        ", entry=" + System.identityHashCode(this) +
+                        ", rmv=" + rmv +
+                        ", ptr=" + offHeapPointer() +
+                        ']');
                 }
+
+                assert rmv;
             }
         }
 
@@ -2711,8 +2811,12 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
                     break;
                 }
 
-                if (log.isDebugEnabled())
-                    log.debug("Entry has been marked obsolete: " + this);
+                if (log.isTraceEnabled()) {
+                    log.trace("entry clear [key=" + key +
+                        ", entry=" + System.identityHashCode(this) +
+                        ", val=" + val +
+                        ", ptr=" + offHeapPointer() + ']');
+                }
 
                 clearIndex(val);
 
@@ -2873,6 +2977,14 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
 
                 if (clear)
                     value(null);
+
+                if (log.isTraceEnabled()) {
+                    log.trace("markObsolete0 [key=" + key +
+                        ", entry=" + System.identityHashCode(this) +
+                        ", ptr=" + offHeapPointer() +
+                        ", clear=" + clear +
+                        ']');
+                }
             }
 
             return obsoleteVer != null;
@@ -2910,6 +3022,14 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
 
             ver = newVer;
 
+            if (log.isTraceEnabled()) {
+                log.trace("invalidate releaseSwap [key=" + key +
+                    ", entry=" + System.identityHashCode(this) +
+                    ", val=" + val +
+                    ", ptr=" + offHeapPointer() +
+                    ']');
+            }
+
             releaseSwap();
 
             clearIndex(val);
@@ -3228,10 +3348,13 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
         if (expireTime > 0) {
             long delta = expireTime - U.currentTimeMillis();
 
-            if (log.isDebugEnabled())
-                log.debug("Checked expiration time for entry [timeLeft=" + delta + ", entry="
+ this + ']');
-
             if (delta <= 0) {
+                if (log.isTraceEnabled()) {
+                    log.trace("checkExpired clear [key=" + key +
+                        ", entry=" + System.identityHashCode(this) +
+                        ", ptr=" + offHeapPointer() + ']');
+                }
+
                 releaseSwap();
 
                 clearIndex(saveValueForIndexUnlocked());
@@ -3759,6 +3882,12 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
                 rmvd = true;
         }
 
+        if (log.isTraceEnabled()) {
+            log.trace("onExpired clear [key=" + key +
+                ", entry=" + System.identityHashCode(this) +
+                ", ptr=" + offHeapPointer() + ']');
+        }
+
         clearIndex(expiredVal);
 
         releaseSwap();
@@ -4173,6 +4302,13 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
             flags &= ~IS_OFFHEAP_PTR_MASK;
 
             if (prevVal != null) {
+                if (log.isTraceEnabled()) {
+                    log.trace("evictFailed [key=" + key +
+                        ", entry=" + System.identityHashCode(this) +
+                        ", ptr=" + offHeapPointer() +
+                        ']');
+                }
+
                 cctx.swap().removeOffheap(key());
 
                 value(prevVal);
@@ -4198,8 +4334,16 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
             if (!hasReaders() && markObsolete0(obsoleteVer, false, null)) {
                 if (!isStartVersion() && hasValueUnlocked()) {
                     if (cctx.offheapTiered() && hasOffHeapPointer()) {
-                        if (cctx.swap().offheapEvictionEnabled())
+                        if (cctx.swap().offheapEvictionEnabled()) {
+                            if (log.isTraceEnabled()) {
+                                log.trace("enableOffheapEviction evictInBatchInternal [key="
+ key +
+                                    ", entry=" + System.identityHashCode(this) +
+                                    ", ptr=" + offHeapPointer() +
+                                    ']');
+                            }
+
                             cctx.swap().enableOffheapEviction(key(), partition());
+                        }
 
                         return null;
                     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/78be02fe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
index a060c8a..1f70374 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java
@@ -2121,6 +2121,9 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
                             IgniteUuid valLdrId = swapEntry.valueClassLoaderId();
 
                             if (ldrId.equals(swapEntry.keyClassLoaderId())) {
+                                if (log.isTraceEnabled())
+                                    log.trace("onUndeploy remove key [ldrId=" + ldrId + ']');
+
                                 iter.removeX();
 
                                 undeployCnt++;
@@ -2138,6 +2141,9 @@ public class GridCacheSwapManager extends GridCacheManagerAdapter {
                                         valLdrId = cctx.deploy().getClassLoaderId(val.getClass().getClassLoader());
                                 }
 
+                                if (log.isTraceEnabled())
+                                    log.trace("onUndeploy remove value [ldrId=" + ldrId +
']');
+
                                 if (ldrId.equals(valLdrId)) {
                                     iter.removeX();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/78be02fe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
index ab51bdb..bf53557 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
@@ -577,6 +577,14 @@ public class GridDhtCacheEntry extends GridDistributedCacheEntry {
                 if (log.isDebugEnabled())
                     log.debug("Entry has been marked obsolete: " + this);
 
+                if (log.isTraceEnabled()) {
+                    log.trace("clearInternal [key=" + key +
+                        ", entry=" + System.identityHashCode(this) +
+                        ", prev=" + prev +
+                        ", ptr=" + offHeapPointer() +
+                        ']');
+                }
+
                 clearIndex(prev);
 
                 // Give to GC.

http://git-wip-us.apache.org/repos/asf/ignite/blob/78be02fe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtOffHeapCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtOffHeapCacheEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtOffHeapCacheEntry.java
index 07272ae..75ee45c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtOffHeapCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtOffHeapCacheEntry.java
@@ -21,6 +21,7 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.util.typedef.internal.S;
 
 /**
  * Replicated cache entry for off-heap tiered or off-heap values modes.
@@ -60,4 +61,11 @@ public class GridDhtOffHeapCacheEntry extends GridDhtCacheEntry {
     @Override protected void offHeapPointer(long valPtr) {
         this.valPtr = valPtr;
     }
+
+    /** {@inheritDoc} */
+    @Override public synchronized String toString() {
+        return S.toString(GridDhtOffHeapCacheEntry.class, this,
+            "entry", System.identityHashCode(this),
+            "super", super.toString());
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/78be02fe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicOffHeapCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicOffHeapCacheEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicOffHeapCacheEntry.java
index 85cfb80..c86d477 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicOffHeapCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicOffHeapCacheEntry.java
@@ -21,6 +21,7 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.util.typedef.internal.S;
 
 /**
  * DHT atomic cache entry for off-heap tiered or off-heap values modes.
@@ -60,4 +61,11 @@ public class GridDhtAtomicOffHeapCacheEntry extends GridDhtAtomicCacheEntry
{
     @Override protected void offHeapPointer(long valPtr) {
         this.valPtr = valPtr;
     }
+
+    /** {@inheritDoc} */
+    @Override public synchronized String toString() {
+        return S.toString(GridDhtAtomicOffHeapCacheEntry.class, this,
+            "entry", System.identityHashCode(this),
+            "super", super.toString());
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/78be02fe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedOffHeapCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedOffHeapCacheEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedOffHeapCacheEntry.java
index ea368d2..8080ca3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedOffHeapCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedOffHeapCacheEntry.java
@@ -21,6 +21,7 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.util.typedef.internal.S;
 
 /**
  * Cache entry for colocated cache for off-heap tiered or off-heap values modes.
@@ -60,4 +61,11 @@ public class GridDhtColocatedOffHeapCacheEntry extends GridDhtColocatedCacheEntr
     @Override protected void offHeapPointer(long valPtr) {
         this.valPtr = valPtr;
     }
+
+    /** {@inheritDoc} */
+    @Override public synchronized String toString() {
+        return S.toString(GridDhtColocatedOffHeapCacheEntry.class, this,
+            "entry", System.identityHashCode(this),
+            "super", super.toString());
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/78be02fe/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
index a97427a..d9d4421 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java
@@ -228,6 +228,9 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
     @Nullable public byte[] remove(@Nullable String spaceName, int part, KeyCacheObject key,
byte[] keyBytes) throws IgniteCheckedException {
         GridOffHeapPartitionedMap m = offheap(spaceName);
 
+        if (log.isTraceEnabled())
+            log.trace("offheap remove [key=" + key + ']');
+
         return m == null ? null : m.remove(part, U.hash(key), keyBytes(key, keyBytes));
     }
 
@@ -249,6 +252,9 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
             throw new IgniteCheckedException("Failed to write data to off-heap space, no
space registered for name: " +
                 spaceName);
 
+        if (log.isTraceEnabled())
+            log.trace("offheap put [key=" + key + ']');
+
         m.put(part, U.hash(key), keyBytes(key, keyBytes), valBytes);
     }
 
@@ -266,6 +272,9 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
         throws IgniteCheckedException {
         GridOffHeapPartitionedMap m = offheap(spaceName);
 
+        if (log.isTraceEnabled())
+            log.trace("offheap removex [key=" + key + ']');
+
         return m != null && m.removex(part, U.hash(key), keyBytes(key, keyBytes));
     }
 
@@ -287,6 +296,9 @@ public class GridOffHeapProcessor extends GridProcessorAdapter {
         IgniteBiPredicate<Long, Integer> p) throws IgniteCheckedException {
         GridOffHeapPartitionedMap m = offheap(spaceName);
 
+        if (log.isTraceEnabled())
+            log.trace("offheap removex [key=" + key + ']');
+
         return m != null && m.removex(part, U.hash(key), keyBytes(key, keyBytes),
p);
     }
 


Mime
View raw message