anton-vinogradov commented on code in PR #13447:
URL: https://github.com/apache/ignite/pull/13447#discussion_r3753941211


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java:
##########
@@ -396,23 +396,14 @@ protected GridDhtLocalPartition localPartition() {
 
         try {
             if (!obsolete()) {
-                info = new GridCacheEntryInfo();
-
-                info.key(key);
-                info.cacheId(cctx.cacheId());
-
                 long expireTime = expireTimeExtras();
 
-                boolean expired = expireTime != 0 && expireTime <= 
U.currentTimeMillis();
+                CacheObject val0 = expireTime == 0 || expireTime > 
U.currentTimeMillis() ? val : null;

Review Comment:
   The expired decision is split across two clock reads, expireTime > 
U.currentTimeMillis() here and expireTime - U.currentTimeMillis() in the 
constructor, so on different ticks the entry goes out with its value while its 
delta is clamped to 0. Please read the time once and pass it into the 
constructor, so the value and the delta come from the same decision.



-- 
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