ege-st commented on code in PR #14074:
URL: https://github.com/apache/pinot/pull/14074#discussion_r1777168201


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/IngestionDelayTracker.java:
##########
@@ -83,22 +82,35 @@
  *
  * TODO: handle bug situations like the one where a partition is not allocated 
to a given server due to a bug.
  */
-
 public class IngestionDelayTracker {
 
   private static class IngestionInfo {
-    final long _ingestionTimeMs;
-    final long _firstStreamIngestionTimeMs;
-    final StreamPartitionMsgOffset _currentOffset;
-    final StreamPartitionMsgOffset _latestOffset;
+    volatile long _ingestionTimeMs;
+    volatile long _firstStreamIngestionTimeMs;
+    volatile StreamPartitionMsgOffset _currentOffset;
+    volatile StreamPartitionMsgOffset _latestOffset;

Review Comment:
   Gotcha, thanks for the explanation. From what I read yesterday, it seems 
like volatile is to tell the compiler to constrain how it optimizes code that 
uses these variables so that concurrent execution of this code behaves 
correctly.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to