lyy-pineapple commented on code in PR #2207:
URL:
https://github.com/apache/incubator-celeborn/pull/2207#discussion_r1444149704
##########
client/src/main/scala/org/apache/celeborn/client/ChangePartitionManager.scala:
##########
@@ -144,7 +183,13 @@ class ChangePartitionManager(
oldPartition,
cause)
// check if there exists request for the partition, if do just register
- val requests = changePartitionRequests.computeIfAbsent(shuffleId,
rpcContextRegisterFunc)
+ val requests =
+ if (!batchHandleChangePartitionEnabled) {
+ changePartitionRequests.computeIfAbsent(shuffleId,
rpcContextRegisterFunc)
+ } else {
+ changePartitionRequests.computeIfAbsent(shuffleId,
rpcContextRegisterFunc)
+ pendingChangePartitionRequests.computeIfAbsent(shuffleId,
rpcContextRegisterFunc)
Review Comment:
Here, the intention is to add shuffleId to changePartitionRequests so that
it can be moved from pendingChangePartitionRequests to changePartitionRequests.
It seems better placed within the batchHandleChangePartitionSchedulerThread
check here.
##########
client/src/main/scala/org/apache/celeborn/client/ChangePartitionManager.scala:
##########
@@ -81,6 +84,42 @@ class ChangePartitionManager(
new Runnable {
override def run(): Unit = {
requests.synchronized {
+ // Move all pending requests to requests
+
pendingChangePartitionRequests.get(shuffleId).synchronized {
Review Comment:
In this thread, pendingChangePartitionRequests will add a change partition
to changePartitionRequests, and pendingChangePartitionRequests quickly releases
the lock to avoid blocking when adding a change partition.
--
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]