This is an automated email from the ASF dual-hosted git repository.
nicholasjiang pushed a commit to branch branch-0.6
in repository https://gitbox.apache.org/repos/asf/celeborn.git
The following commit(s) were added to refs/heads/branch-0.6 by this push:
new ff2e93b0d [CELEBORN-1577][BUG] Quota cancel shuffle should use app
shuffle id
ff2e93b0d is described below
commit ff2e93b0dee009500f8263e91430b3d848cc389b
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]>
(cherry picked from commit 149f3b98b8500627c2fd6432d5fb0cabf314fd9b)
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 e8dc9ddee..66df80323 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]();
@@ -977,6 +978,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))
}
})
@@ -1033,6 +1035,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))
@@ -1238,7 +1241,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())
@@ -2026,8 +2029,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 _ =>
}