bjornarjatten opened a new pull request, #26257:
URL: https://github.com/apache/flink/pull/26257

   ## What is the purpose of the change
   This pull request fixes a visibility issue in the `SystemResourcesCounter 
`class by marking `previousCpuTicks `and `previousProcCpuTicks `as volatile.
   
   Previously, these variables were not declared as volatile, meaning updates 
made by one thread might not be immediately visible to others. This could lead 
to stale values being read by different threads.
   
   By making these variables volatile, we ensure that all threads see the most 
up-to-date values, preventing inconsistencies.
   
   ## Brief change log
   
   - Marked `previousCpuTicks` and `previousProcCpuTicks` as volatile to ensure 
proper visibility across threads.
   
   ## Verifying this change
   This change is a trivial rework/code cleanup without any test coverage.
   
   ## Does this pull request potentially affect one of the following parts?
   
   - Dependencies (does it add or upgrade a dependency)? No
   - The public API (i.e., is any changed class annotated with 
`@Public(Evolving)`)? No
   - The serializers? Unsure
   - The runtime per-record code paths (performance sensitive)? Unsure
   - Anything that affects deployment or recovery (JobManager, Checkpointing, 
Kubernetes/Yarn, ZooKeeper)? Unsure
   - The S3 file system connector? Unsure
   
   ## Documentation
   
   - Does this pull request introduce a new feature? No
   - If yes, how is the feature documented? Not applicable


-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to