HolyLow commented on code in PR #3568:
URL: https://github.com/apache/celeborn/pull/3568#discussion_r2639097118


##########
cpp/celeborn/client/writer/PushState.h:
##########
@@ -68,15 +73,28 @@ class PushState {
 
   std::atomic<int> currBatchId_{1};
   std::atomic<long> totalInflightReqs_{0};
+  std::atomic<long> totalInflightBytes_{0};
   const long waitInflightTimeoutMs_;
   const long deltaMs_;
   const std::unique_ptr<PushStrategy> pushStrategy_;
   const int maxInFlightReqsTotal_;
+  const bool maxInFlightBytesSizeEnabled_;
+  const long maxInFlightBytesSizeTotal_;
+  const long maxInFlightBytesSizePerWorker_;
   utils::ConcurrentHashMap<
       std::string,
       std::shared_ptr<utils::ConcurrentHashSet<int>>>
       inflightBatchesPerAddress_;
+  std::optional<utils::ConcurrentHashMap<
+      std::string, 
+      std::shared_ptr<std::atomic<long>>>> 
+      inflightBytesSizePerAddress_;
+  std::optional<utils::ConcurrentHashMap<
+      int,
+      int>>
+      inflightBatchBytesSizes_;
   folly::Synchronized<std::unique_ptr<std::exception>> exception_;
+  volatile bool cleaned_{false};

Review Comment:
   Why should this be volatile? The volatile keyword in CPP has different 
meaning from Java.



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