vldpyatkov commented on code in PR #13366:
URL: https://github.com/apache/ignite/pull/13366#discussion_r3734165986


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java:
##########
@@ -3175,17 +3175,39 @@ public CacheMetricsImpl metrics0() {
 
                 try {
                     for (int i = 0; i < txEntries.size(); i++) {
-                        GridCacheEntryEx cached = txEntries.get(i).cached();
-                        EntryGetResult getRes = cached.innerGetVersioned(
-                            null,
-                            tx,
-                            /*update-metrics*/false,
-                            /*event*/false,
-                            null,
-                            tx.resolveTaskName(),
-                            null,
-                            false,
-                            null);
+                        IgniteTxEntry txEntry = txEntries.get(i);
+                        EntryGetResult getRes;
+
+                        while (true) {
+                            try {
+                                GridCacheEntryEx cached = txEntry.cached();
+
+                                getRes = cached.innerGetVersioned(
+                                    null,
+                                    tx,
+                                    /*update-metrics*/false,
+                                    /*event*/false,
+                                    null,
+                                    tx.resolveTaskName(),
+                                    null,
+                                    false,
+                                    null);
+
+                                break;
+                            }
+                            catch (GridCacheEntryRemovedException ignored) {
+                                if (log.isDebugEnabled())
+                                    log.debug("Got removed exception in 
lockTxEntries postLock (will retry): "
+                                        + txEntry.cached());
+
+                                KeyCacheObject key = txEntry.key();
+                                GridCacheEntryEx cached = ctx.isColocated()
+                                    ? ctx.colocated().entryExx(key, 
tx.topologyVersion(), true)
+                                    : entryEx(key, tx.topologyVersion());
+
+                                txEntry.cached(cached);

Review Comment:
   What will we do if the entry becomes absolute again in a heavy load? Look at 
the snippet in our code. Everywhere we have a cycle.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to