ascherbakoff commented on a change in pull request #5935: IGNITE-11059 Log tx 
lock timeout.
URL: https://github.com/apache/ignite/pull/5935#discussion_r253009116
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
 ##########
 @@ -1184,6 +1195,60 @@ private void loadMissingFromStore() {
         @Override public String toString() {
             return S.toString(LockTimeoutObject.class, this);
         }
+
+        /**
+         * NB! Should be called in synchronized block on {@link 
GridDhtLockFuture} instance.
+         *
+         * @return String representation of pending locks.
+         */
+        private String dump() {
+            StringBuilder sb = new StringBuilder().append("[");
+
+            Iterator<KeyCacheObject> locks = pendingLocks.iterator();
+
+            while (locks.hasNext()) {
+                KeyCacheObject key = locks.next();
+
+                sb.append("[key=").append(key).append(", owner=");
+
+                try {
 
 Review comment:
   entry API is used incorrectly.
   Should be used like:
   ```
   GridCacheEntryEx entry= cctx.cache().entryEx(key, topVer);
   
   while(true) {
      try {
          // Entry op.
      }
      catch (GridCacheEntryRemovedException ignored) {
          entry= cctx.cache().entryEx(key, topVer); // Reload entry
      }
      finally {
           entry.touch();
      }
   }
   ```
   ContentionClosure also seem to suffer from same error, please fix it too.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to