zuston commented on code in PR #2632:
URL: https://github.com/apache/uniffle/pull/2632#discussion_r2377501337


##########
server/src/main/java/org/apache/uniffle/server/block/DefaultShuffleBlockIdManager.java:
##########
@@ -229,4 +252,11 @@ public boolean contains(String appId) {
   public long getBitmapNum(String appId, int shuffleId) {
     return partitionsToBlockIds.get(appId).get(shuffleId).length;
   }
+
+  private ReadWriteLock getLockForBitmap(String appId, int shuffleId, int 
bitmapArrLocation) {
+    Map<String, ReadWriteLock> innerMap =
+        bitmapLocks.computeIfAbsent(appId, k -> new ConcurrentHashMap<>());

Review Comment:
   `JavaUtils.newConcurrentMap()`



##########
server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java:
##########
@@ -911,6 +911,7 @@ public void removeResources(String appId, boolean 
checkAppExpired) {
         manager.removeBlockIdByAppId(appId);
       }
       shuffleBlockIdManager.removeBlockIdByAppId(appId);
+      shuffleBlockIdManager.removeBitmapLocks(appId);

Review Comment:
   ```
   shuffleBlockIdManager.removeBlockIdByAppId(appId);
   shuffleBlockIdManager.removeBitmapLocks(appId);
   ```
   
   How about including 2 operations into 1 method, like 
`shuffleBlockIdManager.remove(appId)`



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to