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


##########
cpp/celeborn/client/ShuffleClient.cpp:
##########
@@ -135,6 +143,19 @@ bool ShuffleClientImpl::cleanupShuffle(int shuffleId) {
   return true;
 }
 
+bool ShuffleClientImpl::newerPartitionLocationExists(
+    std::shared_ptr<utils::ConcurrentHashMap<
+        int,
+        std::shared_ptr<const protocol::PartitionLocation>>> locationMap,
+    int partitionId,
+    int epoch) {
+  if (auto locationOptional = locationMap->get(partitionId);
+      locationOptional.has_value() && locationOptional.value()->epoch > epoch) 
{

Review Comment:
   You are right that this is a bit verbose. Refactored as suggested. 



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