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


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryInfo.java:
##########
@@ -64,58 +68,70 @@ public class GridCacheEntryInfo implements 
SelfMarshallingMessage, CacheIdAware
     /** Deleted flag. */
     private boolean deleted;
 
-    /** {@inheritDoc} */
-    @Override public int cacheId() {
-        return cacheId;
-    }
-
     /**
-     * @param cacheId Cache ID.
+     * Empty constructor for serialization purposes.
+     * see {@link #expireTimeDelta}.
      */
-    public void cacheId(int cacheId) {
+    public GridCacheEntryInfo() {
+        initTime = U.currentTimeMillis();

Review Comment:
   At read time the delta is not known yet and U.currentTimeMillis() is a 
volatile read, so setting it here for every message is the cheap option. The 
other constructor sets it only inside if (expireTime != 0), so a locally built 
never expiring info keeps initTime at 0 while a received one holds a timestamp; 
please move that assignment above the if as well.



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