bowenliang123 commented on code in PR #2701:
URL: https://github.com/apache/celeborn/pull/2701#discussion_r1739772417


##########
client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala:
##########
@@ -1573,12 +1577,32 @@ class LifecycleManager(val appUniqueId: String, val 
conf: CelebornConf) extends
         latestPartitionLocation.remove(shuffleId)
         commitManager.removeExpiredShuffle(shuffleId)
         changePartitionManager.removeExpiredShuffle(shuffleId)
-        val unregisterShuffleResponse = requestMasterUnregisterShuffle(
-          UnregisterShuffle(appUniqueId, shuffleId, 
MasterClient.genRequestId()))
-        // if unregister shuffle not success, wait next turn
-        if (StatusCode.SUCCESS == 
Utils.toStatusCode(unregisterShuffleResponse.getStatus)) {
+        if (!batchRemoveExpiredShuffles) {
+          val unregisterShuffleResponse = requestMasterUnregisterShuffle(
+            UnregisterShuffle(appUniqueId, shuffleId, 
MasterClient.genRequestId()))
+          // if unregister shuffle not success, wait next turn
+          if (StatusCode.SUCCESS == 
Utils.toStatusCode(unregisterShuffleResponse.getStatus)) {
+            unregisterShuffleTime.remove(shuffleId)
+          }
+        } else {
+          batchRemoveShuffleIds.add(shuffleId)
+        }
+      }
+    }
+    if (!batchRemoveShuffleIds.isEmpty) {

Review Comment:
   ```suggestion
       if (batchRemoveExpiredShuffles) {
   ```
   Use the `batchRemoveExpiredShuffles` for condition would be more easy to 
handle and understand. `batchRemoveShuffleIds` are only collected when 
`batchRemoveExpiredShuffles` is set to be `true` anyway.



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