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

   ## What is the purpose of the change
   This pull request improves thread safety in the SystemResourcesCounter class 
by replacing the bytesReceivedPerInterface array with an AtomicLongArray.
   
   Previously, bytesReceivedPerInterface was a plain long array, meaning 
concurrent updates from multiple threads could lead to data inconsistencies or 
race conditions. By using AtomicLongArray, we ensure that updates are performed 
atomically, preventing potential visibility and synchronization issues.
   
   ## Brief change log
   
   - Replaced long[] bytesReceivedPerInterface with AtomicLongArray 
bytesReceivedPerInterface for improved thread safety.
   - Updated the initialization of bytesReceivedPerInterface to use 
AtomicLongArray.
   - Replaced direct array assignments with atomic set() and get() calls.
   
   ## 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? No
   - The runtime per-record code paths (performance sensitive)? Potentially, as 
it changes how network usage data is stored and updated.
   - Anything that affects deployment or recovery (JobManager, Checkpointing, 
Kubernetes/Yarn, ZooKeeper)? No
   - The S3 file system connector? No
   
   ## 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to