mridulm commented on code in PR #2462:
URL: https://github.com/apache/celeborn/pull/2462#discussion_r1570013336


##########
client/src/main/scala/org/apache/celeborn/client/ChangePartitionManager.scala:
##########
@@ -151,7 +156,7 @@ class ChangePartitionManager(
       oldPartition,
       cause)
 
-    requests.synchronized {
+    locks(partitionId % locks.length).synchronized {
       if (requests.containsKey(partitionId)) {
         requests.get(partitionId).add(changePartition)
         logTrace(s"[handleRequestPartitionLocation] For $shuffleId, request 
for same partition" +

Review Comment:
   This is strictly not the same as what exists in main branch - I have not 
analyzed it greater detail, but the critical sections are different.
   Note that the changes I proposed above are to ensure we remove avoidable 
probes into the map, and improve performance while not changing the critical 
sections ... but if the version I proposed does cause deadlocks/hangs, I would 
be very curious to know why ! (stack trace would definitely help) thanks.



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