zstan commented on code in PR #13366:
URL: https://github.com/apache/ignite/pull/13366#discussion_r3736451942
##########
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:
Ok this is a reply for second part of my question, and what about : "you
found that entry is obsolete here and renew cached ver - is it correct ?"
--
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]