This is an automated email from the ASF dual-hosted git repository.

nicholasjiang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git


The following commit(s) were added to refs/heads/main by this push:
     new 149f3b98b [CELEBORN-1577][BUG] Quota cancel shuffle should use app 
shuffle id
149f3b98b is described below

commit 149f3b98b8500627c2fd6432d5fb0cabf314fd9b
Author: Sanskar Modi <[email protected]>
AuthorDate: Wed Apr 15 15:07:35 2026 +0800

    [CELEBORN-1577][BUG] Quota cancel shuffle should use app shuffle id
    
    ### What changes were proposed in this pull request?
    
    - Added a new mapping for celebornShuffleId -> appShuffleId
    - cancelAllActiveStages should passing appShuffleId not celebornShuffleId
    
    ### Why are the changes needed?
    
    `shuffleAllocatedWorkers` worker contains celebornShuffleId, we need to use 
`appShuffleId` because DAGScheduler only understand app shuffle id.
    
    ### Does this PR resolve a correctness bug?
    
    No
    
    ### Does this PR introduce _any_ user-facing change?
    
    No
    
    ### How was this patch tested?
    
    NA
    
    Closes #3662 from s0nskar/fix_quota_shuffle_id.
    
    Authored-by: Sanskar Modi <[email protected]>
    Signed-off-by: SteNicholas <[email protected]>
---
 .../scala/org/apache/celeborn/client/LifecycleManager.scala    | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala 
b/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala
index f48f3cd72..a37513a23 100644
--- a/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala
+++ b/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala
@@ -109,6 +109,7 @@ class LifecycleManager(val appUniqueId: String, val conf: 
CelebornConf) extends
   private val shuffleIdMapping = JavaUtils.newConcurrentHashMap[
     Int,
     scala.collection.mutable.LinkedHashMap[String, (Int, Boolean)]]()
+  private val celebornShuffleIdToAppShuffleIdMap = 
JavaUtils.newConcurrentHashMap[Int, Int]()
   private val shuffleIdGenerator = new AtomicInteger(0)
   // app shuffle id -> whether shuffle is determinate, rerun of a 
indeterminate shuffle gets different result
   private val appShuffleDeterminateMap = JavaUtils.newConcurrentHashMap[Int, 
Boolean]();
@@ -997,6 +998,7 @@ class LifecycleManager(val appUniqueId: String, val conf: 
CelebornConf) extends
                 : scala.collection.mutable.LinkedHashMap[String, (Int, 
Boolean)] = {
               val newShuffleId = shuffleIdGenerator.getAndIncrement()
               logInfo(s"generate new shuffleId $newShuffleId for appShuffleId 
$appShuffleId appShuffleIdentifier $appShuffleIdentifier")
+              celebornShuffleIdToAppShuffleIdMap.put(newShuffleId, 
appShuffleId)
               scala.collection.mutable.LinkedHashMap(appShuffleIdentifier -> 
(newShuffleId, true))
             }
           })
@@ -1053,6 +1055,7 @@ class LifecycleManager(val appUniqueId: String, val conf: 
CelebornConf) extends
                   }
                   val newShuffleId = shuffleIdGenerator.getAndIncrement()
                   logInfo(s"generate new shuffleId $newShuffleId for 
appShuffleId $appShuffleId appShuffleIdentifier $appShuffleIdentifier")
+                  celebornShuffleIdToAppShuffleIdMap.put(newShuffleId, 
appShuffleId)
                   validateCelebornShuffleIdForClean.foreach(callback =>
                     callback.accept(appShuffleIdentifier))
                   shuffleIds.put(appShuffleIdentifier, (newShuffleId, true))
@@ -1259,7 +1262,7 @@ class LifecycleManager(val appUniqueId: String, val conf: 
CelebornConf) extends
         }
       }
     }
-
+    celebornShuffleIdToAppShuffleIdMap.remove(shuffleId)
     // add shuffleKey to delay shuffle removal set
     unregisterShuffleTime.put(shuffleId, System.currentTimeMillis())
 
@@ -2047,8 +2050,9 @@ class LifecycleManager(val appUniqueId: String, val conf: 
CelebornConf) extends
         .asScala
         .keys
         .filter(!commitManager.isStageEnd(_))
-        .foreach(c.accept(_, reason))
-
+        .flatMap(shuffleId => 
Option(celebornShuffleIdToAppShuffleIdMap.get(shuffleId)))
+        .toSet
+        .foreach((shuffleId: Int) => c.accept(shuffleId, reason))
     case _ =>
   }
 

Reply via email to